MCPcopy Create free account
hub / github.com/ipython/ipython / _parse_module

Method _parse_module

docs/sphinxext/apigen.py:207–215  ·  view source on GitHub ↗

Parse module defined in *uri*

(self, uri)

Source from the content-addressed store, hash-verified

205 return relpath.replace(os.path.sep, '.')
206
207 def _parse_module(self, uri):
208 ''' Parse module defined in *uri* '''
209 filename = self._uri2path(uri)
210 if filename is None:
211 # nothing that we could handle here.
212 return ([],[])
213 with open(filename, 'rb') as f:
214 mod = ast.parse(f.read())
215 return FuncClsScanner().scan(mod)
216
217 def _import_funcs_classes(self, uri):
218 """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