Make sure staticmethod params are (mostly) inferred correctly, fixes #735
This commit is contained in:
1 parent
7a988d9d8b
commit
110d89724e
3 files changed
+45
-1
No files matched your search
@@ -295,3 +295,11 @@ def cut_value_at_position(leaf, position):
|
||||
|
||||
def get_string_quote(leaf):
|
||||
return re.match(r'\w*("""|\'{3}|"|\')', leaf.value).group(1)
|
||||
|
||||
|
||||
def function_is_static_method(function_node):
|
||||
for decorator in function_node.get_decorators():
|
||||
dotted_name = decorator.children[1]
|
||||
if dotted_name.get_code() == 'staticmethod':
|
||||
return True
|
||||
return False
|
||||
Reference in new issue
Block a user