KEMBAR78
Show warning if `self` / `cls` arguments are missing by sobolevn · Pull Request #11317 · python/mypy · GitHub
Skip to content

Conversation

sobolevn
Copy link
Member

Let's see what tests will be affected! 👀

Closes #11309

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

pandas (https://github.com/pandas-dev/pandas.git)
+ pandas/core/indexes/frozen.py:108: error: unused "type: ignore" comment
+ pandas/core/indexes/frozen.py:109: error: unused "type: ignore" comment

aioredis (https://github.com/aio-libs/aioredis.git)
- aioredis/client.py:4326: note:          def (self: Redis) -> Any
+ aioredis/client.py:4326: note:          def initialize(self: Redis) -> Any

ibis (https://github.com/ibis-project/ibis.git)
+ ibis/backends/parquet/tests/conftest.py:21: note: Looks like the first special argument in a method is not named "self", "cls", or "mcs", maybe it is missing?
+ ibis/backends/hdf5/tests/conftest.py:19: note: Looks like the first special argument in a method is not named "self", "cls", or "mcs", maybe it is missing?
+ ibis/backends/dask/tests/conftest.py:26: note: Looks like the first special argument in a method is not named "self", "cls", or "mcs", maybe it is missing?
+ ibis/backends/csv/tests/conftest.py:22: note: Looks like the first special argument in a method is not named "self", "cls", or "mcs", maybe it is missing?
- ibis/backends/dask/__init__.py:66: note:          def compile(expr: Any, *args: Any, **kwargs: Any) -> Any
+ ibis/backends/dask/__init__.py:66: note:          def compile(self, expr: Any, *args: Any, **kwargs: Any) -> Any
- ibis/backends/base/sql/alchemy/__init__.py:104: note:          def connect(**options: Any) -> Any
+ ibis/backends/base/sql/alchemy/__init__.py:104: note:          def connect(connection_string, **options: Any) -> Any

@sobolevn
Copy link
Member Author

CC @hauntsaninja

@sobolevn
Copy link
Member Author

@JelleZijlstra could you please take a look? 🙂

@JelleZijlstra JelleZijlstra merged commit 53c7bb2 into python:master Oct 19, 2021
@JelleZijlstra
Copy link
Member

Thank you! The pandas mypy-primer change makes it look like you fixed an unrelated bug too.

tushar-deepsource pushed a commit to DeepSourceCorp/mypy that referenced this pull request Jan 20, 2022
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.

Improved hinting / warning diagnostics where parameter named self is missing on instance method

2 participants