Skip to content

Commit d489a24

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

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
@@ -1221,9 +1221,6 @@ def analyze_class_attribute_access(
12211221
is_classmethod = (is_decorated and cast(Decorator, node.node).func.is_class) or (
12221222
isinstance(node.node, SYMBOL_FUNCBASE_TYPES) and node.node.is_class
12231223
)
1224-
is_staticmethod = (is_decorated and cast(Decorator, node.node).func.is_static) or (
1225-
isinstance(node.node, SYMBOL_FUNCBASE_TYPES) and node.node.is_static
1226-
)
12271224
t = get_proper_type(t)
12281225
is_trivial_self = False
12291226
if isinstance(node.node, Decorator):
@@ -1241,7 +1238,7 @@ def analyze_class_attribute_access(
12411238
original_vars=original_vars,
12421239
is_trivial_self=is_trivial_self,
12431240
)
1244-
if is_decorated and not is_staticmethod:
1241+
if is_decorated:
12451242
t = expand_self_type_if_needed(
12461243
t, mx, cast(Decorator, node.node).var, itype, is_class=is_classmethod
12471244
)

0 commit comments

Comments
 (0)