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

Method dirname

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

Source from the content-addressed store, hash-verified

987 return path.rpartition("\\")[2]
988
989 def dirname(self, path):
990 name = path.rstrip("\\").rpartition("\\")[0]
991 if name[1:] == ":":
992 return name + "\\"
993 return name
994
995 def hassuffix(self, path, suffix):
996 return path.casefold().endswith(suffix.casefold())

Callers 15

mainFunction · 0.45
wrapperFunction · 0.45
patternMethod · 0.45
_execvpeFunction · 0.45
get_dataFunction · 0.45
_find_moduleFunction · 0.45
testFunction · 0.45
_url_handlerFunction · 0.45
_get_revised_pathFunction · 0.45
setcopyrightFunction · 0.45
venvFunction · 0.45

Calls 2

rpartitionMethod · 0.45
rstripMethod · 0.45

Tested by

no test coverage detected