mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
Python: Don't import module as module_attr
For `from <pkg> import <attr>` we would use to treat the `<pkg>` (ImportExpr) as a definition of the name `<attr>`. Since this removes bad import-flow, and nothing broke, I'm guessing this was never intentional.
This commit is contained in:
@@ -95,7 +95,7 @@ module ImportResolution {
|
||||
)
|
||||
or
|
||||
exists(Alias a |
|
||||
defn.asExpr() = [a.getValue(), a.getValue().(ImportMember).getModule()] and
|
||||
defn.asExpr() = a.getValue() and
|
||||
a.getAsname().(Name).getId() = name and
|
||||
defn.getScope() = m
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user