MCPcopy Create free account
hub / github.com/ahupp/python-magic / unpath

Function unpath

magic/__init__.py:244–248  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

242try:
243 from os import PathLike
244 def unpath(filename):
245 if isinstance(filename, PathLike):
246 return filename.__fspath__()
247 else:
248 return filename
249except ImportError:
250 def unpath(filename):
251 return filename

Callers 1

coerce_filenameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…