Skip to content

Commit e7da41e

Browse files
endotermicmyint
authored andcommitted
Issue 130: check node.name type (#133)
* check node name type - None type do not have split() operation and will give error * use clear type check * returned first implementation
1 parent f2a57f7 commit e7da41e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cpp/static_data.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ def find_static(function_node):
6060
'constexpr' not in node.type.modifiers
6161
)
6262

63-
if is_not_const and (static_is_optional or is_static):
63+
is_not_none_type = node.name is not None
64+
65+
if is_not_const and (static_is_optional or is_static) and is_not_none_type:
6466
print_warning(node)
6567
count += 1
6668
elif isinstance(node, ast.Function) and node.body:

0 commit comments

Comments
 (0)