Skip to content

Commit

Permalink
Revert "stubtest pos-only differences in dunders (#12184)" (#12293)
Browse files Browse the repository at this point in the history
This reverts commit 777885f.

To help with python/typeshed#7441 and reduce risk of stubtest issues interfering with a mypy release. The extra type correctness here is really minimal.

Co-authored-by: hauntsaninja <>
  • Loading branch information
hauntsaninja authored Mar 5, 2022
1 parent 4d99f7c commit b3752a6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mypy/stubtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ def _verify_signature(
runtime_arg.kind == inspect.Parameter.POSITIONAL_ONLY
and not stub_arg.variable.name.startswith("__")
and not stub_arg.variable.name.strip("_") == "self"
and not is_dunder(function_name, exclude_special=True) # noisy for dunder methods
):
yield (
'stub argument "{}" should be positional-only '
Expand Down

0 comments on commit b3752a6

Please sign in to comment.