-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
Code StyleCode style, linting, code_checksCode style, linting, code_checksTypingtype annotations, mypy/pyright type checkingtype annotations, mypy/pyright type checkinggood first issue
Milestone
Description
This check is no longer relevant:
pandas/.pre-commit-config.yaml
Lines 83 to 88 in 9ab55b4
- id: frame-or-series-union | |
name: Check for use of Union[Series, DataFrame] instead of FrameOrSeriesUnion alias | |
entry: Union\[.*(Series,.*DataFrame|DataFrame,.*Series).*\] | |
language: pygrep | |
types: [python] | |
exclude: ^pandas/_typing\.py$ |
Since using PEP604 rewrites, this would be written as
x: Series | DataFrame
anyway.
x: FrameOrSeriesUnion
is actually just as long as the above, and arguably less explicit.
@simonjayhawkins thoughts on replacing all the FrameOrSeriesUnion
occurrences, removing the alias, and removing the above check?
rhshadrach
Metadata
Metadata
Assignees
Labels
Code StyleCode style, linting, code_checksCode style, linting, code_checksTypingtype annotations, mypy/pyright type checkingtype annotations, mypy/pyright type checkinggood first issue