Skip to content

TYP: added missing __init__ in pandas/core/methods #51052

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 5 commits into from
Feb 1, 2023
Merged

TYP: added missing __init__ in pandas/core/methods #51052

merged 5 commits into from
Feb 1, 2023

Conversation

twoertwein
Copy link
Member

@twoertwein twoertwein commented Jan 29, 2023

See microsoft/pyright#4544 (comment)

Ruff's INP001 could have caught this. Could enable it if the following are ignored:

ci/fix_wheels.py:1:1: INP001 File ci/fix_wheels.py is part of an implicit namespace package. Add an __init__.py.
ci/test_wheels.py:1:1: INP001 File ci/test_wheels.py is part of an implicit namespace package. Add an __init__.py.
doc/make.py:1:1: INP001 File doc/make.py is part of an implicit namespace package. Add an __init__.py.
doc/scripts/eval_performance.py:1:1: INP001 File doc/scripts/eval_performance.py is part of an implicit namespace package. Add an __init__.py.
doc/source/conf.py:1:1: INP001 File doc/source/conf.py is part of an implicit namespace package. Add an __init__.py.
setup.py:1:1: INP001 File setup.py is part of an implicit namespace package. Add an __init__.py.
typings/numba.pyi:1:1: INP001 File typings/numba.pyi is part of an implicit namespace package. Add an __init__.py.
web/pandas_web.py:1:1: INP001 File web/pandas_web.py is part of an implicit namespace package. Add an __init__.py.

@twoertwein twoertwein marked this pull request as draft January 29, 2023 05:26
@twoertwein
Copy link
Member Author

There are some new errors detected - will try to address or ignore them.

@@ -135,7 +135,7 @@ repos:
types: [python]
stages: [manual]
additional_dependencies: &pyright_dependencies
- [email protected].276
- [email protected].284
Copy link
Member Author

Choose a reason for hiding this comment

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

There are more errors with 1.1.291 microsoft/pyright#4546

@twoertwein
Copy link
Member Author

The second commit fixes type issues uncovered by a newer pyright version. The third commit uses Sequence[Hashable] more consistently.

@twoertwein twoertwein marked this pull request as ready for review January 29, 2023 20:49
@twoertwein twoertwein added the Typing type annotations, mypy/pyright type checking label Jan 29, 2023
@mroeschke
Copy link
Member

Looks good just a merge conflict

@twoertwein
Copy link
Member Author

Looks good just a merge conflict

Rebased and green

@mroeschke mroeschke added this to the 2.0 milestone Feb 1, 2023
@mroeschke mroeschke merged commit 2cbd317 into pandas-dev:main Feb 1, 2023
@mroeschke
Copy link
Member

Thanks @twoertwein

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Typing type annotations, mypy/pyright type checking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants