Skip to content

Update "self" parameter error messages#20940

Open
hyperkai wants to merge 3 commits intopython:masterfrom
hyperkai:hyperkai-patch-24
Open

Update "self" parameter error messages#20940
hyperkai wants to merge 3 commits intopython:masterfrom
hyperkai:hyperkai-patch-24

Conversation

@hyperkai
Copy link
Contributor

@hyperkai hyperkai commented Mar 1, 2026

Fix: #20939

@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2026

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

zope.interface (https://github.com/zopefoundation/zope.interface)
- src/zope/interface/interfaces.py:113: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/interfaces.py:113: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/interfaces.py:144: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/interfaces.py:144: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/interfaces.py:164: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/interfaces.py:164: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/interfaces.py:181: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/interfaces.py:181: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/interfaces.py:399: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/interfaces.py:399: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/interfaces.py:423: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/interfaces.py:423: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/interfaces.py:427: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/interfaces.py:427: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/interfaces.py:464: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/interfaces.py:464: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/interfaces.py:1250: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/interfaces.py:1250: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/interfaces.py:1334: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/interfaces.py:1334: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/interfaces.py:1425: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/interfaces.py:1425: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/interfaces.py:1503: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/interfaces.py:1503: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/sequence.py:158: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/sequence.py:158: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/mapping.py:83: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/mapping.py:83: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/mapping.py:87: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/mapping.py:87: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/mapping.py:91: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/mapping.py:91: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/mapping.py:95: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/mapping.py:95: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/mapping.py:117: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/mapping.py:117: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/mapping.py:136: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/mapping.py:136: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/mapping.py:156: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/mapping.py:156: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:83: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:83: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:139: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:139: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:148: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:148: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:155: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:155: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:164: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:164: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:173: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:173: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:192: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:192: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:199: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:199: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:202: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:202: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:234: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:234: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:257: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:257: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:343: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:343: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:346: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:346: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:354: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:354: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:402: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:402: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:406: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:406: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:411: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:411: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:414: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:414: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:417: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:417: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:420: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:420: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:426: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:426: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:433: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:433: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:441: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:441: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:462: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:462: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:469: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:469: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:535: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:535: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:544: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:544: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:553: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:553: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:563: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:563: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/idatetime.py:573: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/idatetime.py:573: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]
- src/zope/interface/common/tests/test_collections.py:132: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
+ src/zope/interface/common/tests/test_collections.py:132: error: Method must have at least one parameter. Did you forget the "self" parameter?  [misc]

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.

A method with no parameter gets a wrong error message saying argument instead of parameter

1 participant