From b3752a60af3f8e6a1b17c4ebc90ed554cb934288 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Fri, 4 Mar 2022 17:50:44 -0800 Subject: [PATCH] Revert "stubtest pos-only differences in dunders (#12184)" (#12293) This reverts commit 777885f2c26cce195f6d23c80fefae1e66dfaac2. To help with https://github.com/python/typeshed/issues/7441 and reduce risk of stubtest issues interfering with a mypy release. The extra type correctness here is really minimal. Co-authored-by: hauntsaninja <> --- mypy/stubtest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mypy/stubtest.py b/mypy/stubtest.py index a08b0aac1097..3320f2370735 100644 --- a/mypy/stubtest.py +++ b/mypy/stubtest.py @@ -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 '