Skip to content

Commit 2fcb132

Browse files
committed
stubtest: Stop telling people to use double underscores
Python 3.7 is long dead.
1 parent 82d0425 commit 2fcb132

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mypy/stubtest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def is_missing_stub(self) -> bool:
133133
def is_positional_only_related(self) -> bool:
134134
"""Whether or not the error is for something being (or not being) positional-only."""
135135
# TODO: This is hacky, use error codes or something more resilient
136-
return "leading double underscore" in self.message
136+
return "should be positional" in self.message
137137

138138
def get_description(self, concise: bool = False) -> str:
139139
"""Returns a description of the error.
@@ -909,7 +909,7 @@ def _verify_signature(
909909
):
910910
yield (
911911
f'stub argument "{stub_arg.variable.name}" should be positional-only '
912-
f'(rename with a leading double underscore, i.e. "__{runtime_arg.name}")'
912+
f'(add "/", e.g. "{runtime_arg.name}, /")'
913913
)
914914
if (
915915
runtime_arg.kind != inspect.Parameter.POSITIONAL_ONLY
@@ -919,7 +919,7 @@ def _verify_signature(
919919
):
920920
yield (
921921
f'stub argument "{stub_arg.variable.name}" should be positional or keyword '
922-
"(remove leading double underscore)"
922+
"(remove \"/\")"
923923
)
924924

925925
# Check unmatched positional args

0 commit comments

Comments
 (0)