MCPcopy Index your code
hub / github.com/RustPython/RustPython / has_magic

Function has_magic

Lib/glob.py:239–244  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

237magic_check_bytes = re.compile(b'([*?[])')
238
239def has_magic(s):
240 if isinstance(s, bytes):
241 match = magic_check_bytes.search(s)
242 else:
243 match = magic_check.search(s)
244 return match is not None
245
246def _ishidden(path):
247 return path[0] in ('.', b'.'[0])

Callers 1

_iglobFunction · 0.85

Calls 2

isinstanceFunction · 0.85
searchMethod · 0.45

Tested by

no test coverage detected