bearomorphism opened a new pull request, #59397:
URL: https://github.com/apache/spark/pull/59397

   ### What changes were proposed in this pull request?
   
   Rename the set of observed categories to `used_categories` in 
`CategoricalAccessor.remove_unused_categories`, and remove the assignment type 
ignore from the subsequent list-valued `categories` variable.
   
   ### Why are the changes needed?
   
   The same local name was used for both a set and a list. Separate names 
preserve consistent inferred types without a suppression or behavior change.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   - `CategoricalTests.test_remove_unused_categories` in 
`pyspark.pandas.tests.test_categorical` passed.
   - Mypy on `python/pyspark/pandas/categorical.py`, Ruff lint/format checks, 
and `git diff --check` passed.
   
   No new tests were added; the existing targeted test covers the unchanged 
behavior.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: pi 1.1.0
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to