mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
joiner order fixes
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import python
|
||||
private import semmle.python.types.Builtins
|
||||
private import semmle.python.internal.CachedStages
|
||||
|
||||
/**
|
||||
* An alias in an import statement, the `mod as name` part of `import mod as name`. May be artificial;
|
||||
@@ -203,7 +204,9 @@ class Import extends Import_ {
|
||||
/** An import * statement */
|
||||
class ImportStar extends ImportStar_ {
|
||||
/* syntax: from modname import * */
|
||||
cached
|
||||
ImportExpr getModuleExpr() {
|
||||
Stages::AST::ref() and
|
||||
result = this.getModule()
|
||||
or
|
||||
result = this.getModule().(ImportMember).getModule()
|
||||
|
||||
@@ -263,6 +263,7 @@ module Value {
|
||||
* object of that name.
|
||||
* For example `Value::named("len")` is the `Value` representing the `len` built-in function.
|
||||
*/
|
||||
pragma[nomagic]
|
||||
Value named(string name) {
|
||||
exists(string modname, string attrname | name = modname + "." + attrname |
|
||||
result = Module::named(modname).attr(attrname)
|
||||
|
||||
Reference in New Issue
Block a user