Skip to content

Commit c528851

Browse files
committed
Remove is_staticmethod check altogether: there's no concept of self types for static methods
1 parent ed88d82 commit c528851

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

mypy/checkmember.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,9 +1227,6 @@ def analyze_class_attribute_access(
12271227
is_classmethod = (is_decorated and cast(Decorator, node.node).func.is_class) or (
12281228
isinstance(node.node, SYMBOL_FUNCBASE_TYPES) and node.node.is_class
12291229
)
1230-
is_staticmethod = (is_decorated and cast(Decorator, node.node).func.is_static) or (
1231-
isinstance(node.node, SYMBOL_FUNCBASE_TYPES) and node.node.is_static
1232-
)
12331230
t = get_proper_type(t)
12341231
is_trivial_self = False
12351232
if isinstance(node.node, Decorator):
@@ -1247,7 +1244,7 @@ def analyze_class_attribute_access(
12471244
original_vars=original_vars,
12481245
is_trivial_self=is_trivial_self,
12491246
)
1250-
if is_decorated and not is_staticmethod:
1247+
if is_decorated:
12511248
t = expand_self_type_if_needed(
12521249
t, mx, cast(Decorator, node.node).var, itype, is_class=is_classmethod
12531250
)

0 commit comments

Comments
 (0)