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

Function load_pattern_files

ci/lint.py:11–19  ·  view source on GitHub ↗
(paths)

Source from the content-addressed store, hash-verified

9DFHACK_ROOT = os.path.normpath(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
10
11def load_pattern_files(paths):
12 patterns = []
13 for p in paths:
14 with open(p) as f:
15 for line in f.readlines():
16 line = line.strip()
17 if line and not line.startswith('#'):
18 patterns.append(line)
19 return patterns
20
21def valid_file(rel_path, check_patterns, ignore_patterns):
22 return (

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected