Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 56515c5

Browse files
tausbnRasmusWL
andauthored
Python: Improve documentation for moduleImport
Co-authored-by: Rasmus Wriedt Larsen <[email protected]>
1 parent 05f290f commit 56515c5

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

python/ql/src/semmle/python/ApiGraphs.qll

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,13 @@ module API {
196196
/** Gets the root node. */
197197
Root root() { any() }
198198

199-
/** Gets a node corresponding to an import of module `m`. */
199+
/**
200+
* Gets a node corresponding to an import of module `m`.
201+
*
202+
* Note: You should only use this predicate for top level modules. If you want nodes corresponding to a submodule,
203+
* you should use `.getMember` on the parent module. For example, for nodes corresponding to the module `foo.bar`,
204+
* use `moduleImport("foo").getMember("bar")`.
205+
*/
200206
Node moduleImport(string m) { result = Impl::MkModuleImport(m) }
201207

202208
/**

0 commit comments

Comments
 (0)