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 8b3d25a commit 68bcd7aCopy full SHA for 68bcd7a
mypy/checkmember.py
@@ -780,7 +780,13 @@ def analyze_var(
780
var.is_initialized_in_class
781
and (not is_instance_var(var) or mx.is_operator)
782
):
783
- call_type = _analyze_member_access("__call__", typ, mx)
+ call_type: ProperType
784
+ if isinstance(typ, FunctionLike) and not typ.is_type_obj():
785
+ call_type = typ
786
+ elif var.is_property:
787
+ call_type = get_proper_type(_analyze_member_access("__call__", typ, mx))
788
+ else:
789
790
if isinstance(call_type, FunctionLike) and not call_type.is_type_obj():
791
if mx.is_lvalue:
792
if var.is_property:
0 commit comments