Skip to content

Commit 312a014

Browse files
Aurélien COETAurélien COET
Aurélien COET
authored and
Aurélien COET
committed
Update staticfg to support function calls on list indices and strings
1 parent 22d6018 commit 312a014

File tree

10 files changed

+9
-1
lines changed

10 files changed

+9
-1
lines changed

.gitignore

100644100755
+4
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@
66

77
# Python egg metadata, regenerated from source files by setuptools.
88
/*.egg-info
9+
10+
**/.DS_Store
11+
12+
/build

LICENSE

100644100755
File mode changed.

README.md

100644100755
File mode changed.

assets/example_cfg.png

100644100755
File mode changed.

examples/build_cfg.py

100644100755
File mode changed.

setup.py

100644100755
+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
setup(name='staticfg',
5-
version='0.9.2',
5+
version='0.9.4',
66
url='https://github.com/coetaur0/staticfg',
77
license='Apache 2',
88
author='Aurelien Coet',

staticfg/__init__.py

100644100755
File mode changed.

staticfg/builder.py

100644100755
+4
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,10 @@ def visit_func(node):
254254
func_name = visit_func(node.value)
255255
func_name += "." + node.attr
256256
return func_name
257+
elif type(node) == ast.Str:
258+
return node.s
259+
elif type(node) == ast.Subscript:
260+
return node.value.id
257261

258262
func = node.func
259263
func_name = visit_func(func)

staticfg/model.py

100644100755
File mode changed.

tests/test_model.py

100644100755
File mode changed.

0 commit comments

Comments
 (0)