Python: Improve documentation for moduleImport

Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
This commit is contained in:
Taus
2021-02-03 21:29:15 +01:00
committed by GitHub
parent 05f290f734
commit 56515c5708

View File

@@ -196,7 +196,13 @@ module API {
/** Gets the root node. */
Root root() { any() }
/** Gets a node corresponding to an import of module `m`. */
/**
* Gets a node corresponding to an import of module `m`.
*
* Note: You should only use this predicate for top level modules. If you want nodes corresponding to a submodule,
* you should use `.getMember` on the parent module. For example, for nodes corresponding to the module `foo.bar`,
* use `moduleImport("foo").getMember("bar")`.
*/
Node moduleImport(string m) { result = Impl::MkModuleImport(m) }
/**