PY-48219 Use PyModuleType to get attributes of a not imported module

It gives more accurate results and allows to bypass the problem
of PyFile#iterateNames(), which limits the results by the content
of "__all__" (as the method is used to resolve names in star imports).

GitOrigin-RevId: b19604d9e25a738909a02a1d81e4716675417430
This commit is contained in:
Mikhail Golubev
2021-08-23 10:14:10 +00:00
committed by intellij-monorepo-bot
parent 83b3990673
commit 7fc1f80e2e
7 changed files with 49 additions and 13 deletions
@@ -0,0 +1,3 @@
import numpy as np
np.arange()
@@ -0,0 +1,9 @@
def max():
pass
def arange():
pass
__all__ = ['max']
@@ -0,0 +1,3 @@
foo = 1
bar = 2
__all__ = ['bar']