Python: Revert "Python: Support moduleImport("dotted.name") in API graphs"

This reverts commit 2c4a477a4e.

It's probably best _not_ to do this, as any `getMember` cycle in the
API graph will lead to nontermination.
This commit is contained in:
Taus Brock-Nannestad
2021-02-11 16:08:28 +01:00
parent ea30598a08
commit 4c66071f5f

View File

@@ -209,14 +209,12 @@ module API {
/**
* 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)
or
exists(string before_dot, string after_dot | before_dot + "." + after_dot = m |
result = moduleImport(before_dot).getMember(after_dot)
)
}
Node moduleImport(string m) { result = Impl::MkModuleImport(m) }
/**
* Provides the actual implementation of API graphs, cached for performance.