MCPcopy Index your code
hub / github.com/RustPython/RustPython / Module

Class Module

Lib/modulefinder.py:95–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93
94
95class Module:
96
97 def __init__(self, name, file=None, path=None):
98 self.__name__ = name
99 self.__file__ = file
100 self.__path__ = path
101 self.__code__ = None
102 # The set of global names that are assigned to in the module.
103 # This includes those names imported through starimports of
104 # Python modules.
105 self.globalnames = {}
106 # The set of starimports this module did that could not be
107 # resolved, ie. a starimport from a non-Python module.
108 self.starimports = {}
109
110 def __repr__(self):
111 s = "Module(%r" % (self.__name__,)
112 if self.__file__ is not None:
113 s = s + ", %r" % (self.__file__,)
114 if self.__path__ is not None:
115 s = s + ", %r" % (self.__path__,)
116 s = s + ")"
117 return s
118
119class ModuleFinder:
120

Callers 5

add_moduleMethod · 0.70
parse_argsFunction · 0.50
parseFunction · 0.50
compileFunction · 0.50
ast_from_objectMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected