MCPcopy Create free account
hub / github.com/DFHack/dfhack / valid_file

Function valid_file

ci/lint.py:21–25  ·  view source on GitHub ↗
(rel_path, check_patterns, ignore_patterns)

Source from the content-addressed store, hash-verified

19 return patterns
20
21def valid_file(rel_path, check_patterns, ignore_patterns):
22 return (
23 any(fnmatch.fnmatch(rel_path, pattern) for pattern in check_patterns)
24 and not any(fnmatch.fnmatch(rel_path, pattern) for pattern in ignore_patterns)
25 )
26
27success = True
28def error(msg=None):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected