File tree Expand file tree Collapse file tree
python/ql/lib/semmle/python Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import python
22private import semmle.python.types.Builtins
3+ private import semmle.python.internal.CachedStages
34
45/**
56 * 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_ {
203204/** An import * statement */
204205class ImportStar extends ImportStar_ {
205206 /* syntax: from modname import * */
207+ cached
206208 ImportExpr getModuleExpr ( ) {
209+ Stages:: AST:: ref ( ) and
207210 result = this .getModule ( )
208211 or
209212 result = this .getModule ( ) .( ImportMember ) .getModule ( )
Original file line number Diff line number Diff line change @@ -263,6 +263,7 @@ module Value {
263263 * object of that name.
264264 * For example `Value::named("len")` is the `Value` representing the `len` built-in function.
265265 */
266+ pragma [ nomagic]
266267 Value named ( string name ) {
267268 exists ( string modname , string attrname | name = modname + "." + attrname |
268269 result = Module:: named ( modname ) .attr ( attrname )
You can’t perform that action at this time.
0 commit comments