Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions mypy/checkexpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1322,6 +1322,8 @@ def analyze_super(self, e: SuperExpr, is_lvalue: bool) -> Type:
# There's an undefined base class, and we're
# at the end of the chain. That's not an error.
return AnyType()
if not self.chk.typing_mode_full():
return AnyType()
return analyze_member_access(e.name, self_type(e.info), e,
is_lvalue, True,
self.named_type, self.not_ready_callback,
Expand Down
9 changes: 9 additions & 0 deletions mypy/test/data/check-super.test
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,12 @@ class C(B):
def __init__(self, arg=0):
super(C, self).__init__(arg, arg=arg)
[out]

[case testSuperSilentInDynamicFunction]
class A:
pass

class B(A):
def foo(self):
super(B, self).foo() # Not an error
[out]