We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a473e52 commit 8f08c60Copy full SHA for 8f08c60
mypy/checkexpr.py
@@ -1680,8 +1680,7 @@ def check_callable_call(
1680
if isinstance(callable_node.node, TypeInfo):
1681
callable_info = callable_node.node
1682
if callable_info is not None:
1683
- self.chk.check_deprecated(callable_node.node.get_method("__new__"), context)
1684
- self.chk.check_deprecated(callable_node.node.get_method("__init__"), context)
+ self.chk.check_deprecated(callee.definition, context)
1685
1686
if callable_node.fullname in ENUM_BASES:
1687
# An Enum() call that failed SemanticAnalyzerPass2.check_enum_call().
0 commit comments