Skip to content

Commit

Permalink
Make Loader._process_module public.
Browse files Browse the repository at this point in the history
As described. Allows pytype drivers to more freely add ASTs to a
persistent `Loader` object, to be used in situations where in-place
modification of the loaded modules is desired.

#pytype-in-cider

PiperOrigin-RevId: 612509207
  • Loading branch information
Spyboticsguy authored and rchen152 committed Mar 4, 2024
1 parent a5b8f4f commit dcd8daf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pytype/load_pytd.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,9 +404,9 @@ def load_module(self, mod_info, mod_ast=None):
return existing
if not mod_ast:
mod_ast = self._module_loader.load_ast(mod_info)
return self._process_module(mod_info, mod_ast)
return self.process_module(mod_info, mod_ast)

def _process_module(self, mod_info, mod_ast):
def process_module(self, mod_info, mod_ast):
"""Create a module from a loaded ast and save it to the loader cache.
Args:
Expand Down

0 comments on commit dcd8daf

Please sign in to comment.