mirror of
https://github.com/github/codeql.git
synced 2026-05-19 13:48:30 +02:00
Python: Fix underlying problem of not using Alias
This commit is contained in:
@@ -163,12 +163,13 @@ module NotExposed {
|
||||
newOrExistingModeling(spec).getASubclass*().getAValueReachableFromSource().asExpr() and
|
||||
importMember.getScope() = mod and
|
||||
loc = importMember.getLocation() and
|
||||
(
|
||||
mod.isPackageInit() and
|
||||
newAliasFullyQualified = mod.getPackageName() + "." + importMember.getName()
|
||||
exists(Alias alias, string base |
|
||||
mod.isPackageInit() and base = mod.getPackageName()
|
||||
or
|
||||
not mod.isPackageInit() and
|
||||
newAliasFullyQualified = mod.getName() + "." + importMember.getName()
|
||||
not mod.isPackageInit() and base = mod.getName()
|
||||
|
|
||||
alias.getValue() = importMember and
|
||||
newAliasFullyQualified = base + "." + alias.getAsname()
|
||||
) and
|
||||
(
|
||||
not hasAllStatement(mod)
|
||||
|
||||
Reference in New Issue
Block a user