Merge pull request #5582 from RasmusWL/all-tuple

Python: Add support for `__all__` assigned to tuple
This commit is contained in:
Taus
2021-04-08 13:03:27 +02:00
committed by GitHub
10 changed files with 145 additions and 1 deletions

View File

@@ -129,7 +129,11 @@ class Module extends Module_, Scope, AstNode {
a.defines(all) and
a.getScope() = this and
all.getId() = "__all__" and
a.getValue().(List).getAnElt().(StrConst).getText() = name
(
a.getValue().(List).getAnElt().(StrConst).getText() = name
or
a.getValue().(Tuple).getAnElt().(StrConst).getText() = name
)
)
}