File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -493,10 +493,6 @@ def __init__(
493493 # since it's possible that the name will be there once the namespace is complete.
494494 self .incomplete_namespaces = incomplete_namespaces
495495 self .all_exports : list [str ] = []
496- # Map from module id to list of explicitly exported names (i.e. names in __all__).
497- # This is used by stubgen/stubtest, DO NOT use for any other purposes as it is
498- # not populated on incremental runs (nor in parallel mode).
499- self .export_map : dict [str , list [str ]] = {}
500496 self .plugin = plugin
501497 # If True, process function definitions. If False, don't. This is used
502498 # for processing module top levels in fine-grained incremental mode.
@@ -724,7 +720,6 @@ def refresh_top_level(self, file_node: MypyFile) -> None:
724720 if file_node .fullname == "typing_extensions" :
725721 self .add_typing_extension_aliases (file_node )
726722 self .adjust_public_exports ()
727- self .export_map [self .cur_mod_id ] = self .all_exports
728723 self .all_exports = []
729724
730725 def add_implicit_module_attrs (self , file_node : MypyFile ) -> None :
Original file line number Diff line number Diff line change @@ -1773,7 +1773,11 @@ def generate_asts_for_modules(
17731773 mod .ast = res .graph [mod .module ].tree
17741774 # Use statically inferred __all__ if there is no runtime one.
17751775 if mod .runtime_all is None :
1776- mod .runtime_all = res .manager .semantic_analyzer .export_map [mod .module ]
1776+ mod .runtime_all = [
1777+ name
1778+ for name , sym in res .manager .semantic_analyzer .modules [mod .module ].names .items ()
1779+ if sym .module_public
1780+ ]
17771781
17781782
17791783def generate_stub_for_py_module (
You can’t perform that action at this time.
0 commit comments