MCPcopy
hub / github.com/beetbox/beets / normpath

Function normpath

beets/util/__init__.py:174–180  ·  view source on GitHub ↗

Provide the canonical form of the path suitable for storing in the database.

(path: PathLike)

Source from the content-addressed store, hash-verified

172
173
174def normpath(path: PathLike) -> bytes:
175 """Provide the canonical form of the path suitable for storing in
176 the database.
177 """
178 str_path = syspath(path, prefix=False)
179 str_path = os.path.normpath(os.path.abspath(os.path.expanduser(str_path)))
180 return bytestring_path(str_path)
181
182
183def ancestry(path: AnyStr) -> list[AnyStr]:

Callers 15

_assert_destMethod · 0.90
test_pathtypeFunction · 0.90
readMethod · 0.90
writeMethod · 0.90
destinationMethod · 0.90
__init__Method · 0.90
move_funcFunction · 0.90
parse_logfilesFunction · 0.90
import_funcFunction · 0.90
loadMethod · 0.90
writeMethod · 0.90
tag_dataFunction · 0.90

Calls 2

syspathFunction · 0.85
bytestring_pathFunction · 0.85

Tested by 2

_assert_destMethod · 0.72
test_pathtypeFunction · 0.72