MCPcopy Index your code
hub / github.com/ipython/ipython / _parse_module

Method _parse_module

docs/sphinxext/apigen.py:206–214  ·  view source on GitHub ↗

Parse module defined in *uri*

(self, uri)

Source from the content-addressed store, hash-verified

204 return relpath.replace(os.path.sep, '.')
205
206 def _parse_module(self, uri):
207 ''' Parse module defined in *uri* '''
208 filename = self._uri2path(uri)
209 if filename is None:
210 # nothing that we could handle here.
211 return ([],[])
212 with open(filename, 'rb') as f:
213 mod = ast.parse(f.read())
214 return FuncClsScanner().scan(mod)
215
216 def _import_funcs_classes(self, uri):
217 """Import * from uri, and separate out functions and classes."""

Callers 1

find_funcs_classesMethod · 0.95

Calls 5

_uri2pathMethod · 0.95
FuncClsScannerClass · 0.85
readMethod · 0.80
scanMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected