Skip to content

CLN: update flake8-pyi #169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 26, 2022
Merged

CLN: update flake8-pyi #169

merged 2 commits into from
Jul 26, 2022

Conversation

twoertwein
Copy link
Member

The big changes are:

Y041 detects redundant numeric unions. For example, PEP 484 specifies that type checkers should treat int as an implicit subtype of float, so int is redundant in the union int | float. In the same way, int is redundant in the union int | complex, and float is redundant in the union float | complex.
Y044 from future import annotations has no effect in stub files, as forward references in stubs are enabled by default.

@@ -43,16 +41,14 @@ from pandas.core.dtypes.dtypes import ExtensionDtype

ArrayLike = Union[ExtensionArray, np.ndarray]
AnyArrayLike = Union[Index, Series, np.ndarray]
PythonScalar = Union[str, int, float, bool, complex]
PythonScalar = Union[str, bool, complex]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR to make these changes in pandas pandas-dev/pandas#47850

Copy link
Collaborator

@Dr-Irv Dr-Irv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @twoertwein

@Dr-Irv Dr-Irv merged commit 5aeb6cd into pandas-dev:main Jul 26, 2022
@twoertwein twoertwein deleted the pyi branch September 21, 2022 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants