Skip to content
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

More helpful error for missing self #14386

Merged
merged 3 commits into from
Jan 3, 2023

Conversation

hauntsaninja
Copy link
Collaborator

Fixes #14385

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Nice idea!

mypy/semanal.py Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

github-actions bot commented Jan 3, 2023

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

prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/orion/orchestration/global_policy.py:45: error: Method must have at least one argument  [misc]
+ src/prefect/orion/orchestration/global_policy.py:45: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
- src/prefect/orion/orchestration/global_policy.py:62: error: Method must have at least one argument  [misc]
+ src/prefect/orion/orchestration/global_policy.py:62: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
- src/prefect/orion/orchestration/core_policy.py:41: error: Method must have at least one argument  [misc]
+ src/prefect/orion/orchestration/core_policy.py:41: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
- src/prefect/orion/orchestration/core_policy.py:58: error: Method must have at least one argument  [misc]
+ src/prefect/orion/orchestration/core_policy.py:58: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
- src/prefect/orion/orchestration/core_policy.py:76: error: Method must have at least one argument  [misc]
+ src/prefect/orion/orchestration/core_policy.py:76: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
- src/prefect/orion/orchestration/core_policy.py:81: error: Method must have at least one argument  [misc]
+ src/prefect/orion/orchestration/core_policy.py:81: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]

@hauntsaninja hauntsaninja merged commit 2413578 into python:master Jan 3, 2023
@hauntsaninja hauntsaninja deleted the self-error branch January 3, 2023 22:45
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.

Method must have at least one argument [misc]
3 participants