@@ -35,10 +35,10 @@ private import semmle.python.dataflow.new.TypeTracker
35
35
* 1. If `foo` is a module, and `bar` is an attribute of `foo`, then `from foo import bar` imports
36
36
* the attribute `bar` into the current module (binding it to the name `bar`).
37
37
* 2. If `foo` is a package, and `bar` is a submodule of `foo`, then `from foo import bar` first imports
38
- * `foo.bar`, and then attempts to locate the `bar` attribute again . In most cases, that attribute
38
+ * `foo.bar`, and then reads the `bar` attribute on `foo` . In most cases, that attribute
39
39
* will then point to the `bar` submodule.
40
40
*
41
- * Now, when in comes to how these imports are represented in the AST, things get a bit complicated.
41
+ * Now, when it comes to how these imports are represented in the AST, things get a bit complicated.
42
42
* First of all, both of the above forms of imports get mapped to the same kind of AST node:
43
43
* `Import`. An `Import` node has a sequence of names, each of which is an `Alias` node. This `Alias`
44
44
* node represents the `x as y` bit of each imported module.
@@ -230,7 +230,7 @@ module ImportResolution {
230
230
module_reexport ( p , attr_name , m )
231
231
)
232
232
or
233
- // Submodules that are implicitly defined when importing via `from ... import ...` statements .
233
+ // Submodules that are implicitly defined whith relative imports of the form `from .foo import ...`.
234
234
// In practice, we create a definition for each module in a package, even if it is not imported.
235
235
exists ( string submodule , Module package |
236
236
SsaSource:: init_module_submodule_defn ( result .asVar ( ) .getSourceVariable ( ) ,
0 commit comments