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

Method _path2uri

docs/sphinxext/apigen.py:199–204  ·  view source on GitHub ↗

Convert directory path to uri

(self, dirpath)

Source from the content-addressed store, hash-verified

197 return path
198
199 def _path2uri(self, dirpath):
200 ''' Convert directory path to uri '''
201 relpath = dirpath.replace(self.root_path, self.package_name)
202 if relpath.startswith(os.path.sep):
203 relpath = relpath[1:]
204 return relpath.replace(os.path.sep, '.')
205
206 def _parse_module(self, uri):
207 ''' Parse module defined in *uri* '''

Callers 1

discover_modulesMethod · 0.95

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected