File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
python/ql/src/semmle/python Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -209,14 +209,12 @@ module API {
209
209
210
210
/**
211
211
* Gets a node corresponding to an import of module `m`.
212
+ *
213
+ * Note: You should only use this predicate for top level modules. If you want nodes corresponding to a submodule,
214
+ * you should use `.getMember` on the parent module. For example, for nodes corresponding to the module `foo.bar`,
215
+ * use `moduleImport("foo").getMember("bar")`.
212
216
*/
213
- Node moduleImport ( string m ) {
214
- result = Impl:: MkModuleImport ( m )
215
- or
216
- exists ( string before_dot , string after_dot | before_dot + "." + after_dot = m |
217
- result = moduleImport ( before_dot ) .getMember ( after_dot )
218
- )
219
- }
217
+ Node moduleImport ( string m ) { result = Impl:: MkModuleImport ( m ) }
220
218
221
219
/**
222
220
* Provides the actual implementation of API graphs, cached for performance.
You can’t perform that action at this time.
0 commit comments