Skip to content

Commit 8d7c330

Browse files
committed
...replace the newly added occurrence.
1 parent 986f752 commit 8d7c330

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/suggestions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ def get_suggestion(self, mod: str, node: FuncDef) -> PyAnnotateSignature:
474474
if self.no_errors and orig_errors:
475475
raise SuggestionFailure("Function does not typecheck.")
476476

477-
is_method = bool(node.info) and (not node.is_static or node.name == "__new__")
477+
is_method = bool(node.info) and node.has_self_or_cls_argument
478478

479479
with state.strict_optional_set(graph[mod].options.strict_optional):
480480
guesses = self.get_guesses(

0 commit comments

Comments
 (0)