Skip to content

Commit ab3edf3

Browse files

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

python/ql/src/semmle/python/Module.qll

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,11 @@ class Module extends Module_, Scope, AstNode {
129129
a.defines(all) and
130130
a.getScope() = this and
131131
all.getId() = "__all__" and
132-
a.getValue().(List).getAnElt().(StrConst).getText() = name
132+
(
133+
a.getValue().(List).getAnElt().(StrConst).getText() = name
134+
or
135+
a.getValue().(Tuple).getAnElt().(StrConst).getText() = name
136+
)
133137
)
134138
}
135139

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
| all_dynamic.py:0:0:0:0 | Module all_dynamic | foo |
22
| all_list.py:0:0:0:0 | Module all_list | bar |
33
| all_list.py:0:0:0:0 | Module all_list | foo |
4+
| all_tuple.py:0:0:0:0 | Module all_tuple | bar |
5+
| all_tuple.py:0:0:0:0 | Module all_tuple | foo |

0 commit comments

Comments
 (0)