MCPcopy Index your code
hub / github.com/python/cpython / add_known_dir

Method add_known_dir

Lib/test/test_getpath.py:1146–1150  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

1144 self._links[path] = target
1145
1146 def add_known_dir(self, path):
1147 p = path.rstrip("/")
1148 while p:
1149 self._dirs.add(p)
1150 p = p.rpartition("/")[0]
1151
1152 def __missing__(self, key):
1153 try:

Calls 3

rstripMethod · 0.45
addMethod · 0.45
rpartitionMethod · 0.45

Tested by

no test coverage detected