1 # SPDX-License-Identifier: GPL-2.0-or-later
12 PATHS
: Tuple
[str, ...] = (
17 "release/scripts/freestyle",
18 "release/scripts/modules",
19 "release/scripts/presets",
20 "release/scripts/startup",
21 "release/scripts/templates_py",
27 SOURCE_DIR
= os
.path
.normpath(os
.path
.abspath(os
.path
.normpath(
28 os
.path
.join(os
.path
.dirname(__file__
), "..", "..", ".."))))
31 os
.path
.join(SOURCE_DIR
, p
.replace("/", os
.sep
))
35 PATHS_EXCLUDE
: Set
[str] = set(
36 os
.path
.join(SOURCE_DIR
, p
.replace("/", os
.sep
))
39 "source/tools/svn_rev_map/sha1_to_rev.py",
40 "source/tools/svn_rev_map/rev_to_sha1.py",
41 "source/tools/svn_rev_map/rev_to_sha1.py",
42 "release/scripts/modules/rna_manual_reference.py",
47 def files(path
: str, test_fn
: Callable
[[str], bool]) -> Generator
[str, None, None]:
48 for dirpath
, dirnames
, filenames
in os
.walk(path
):
50 dirnames
[:] = [d
for d
in dirnames
if not d
.startswith(".")]
51 for filename
in filenames
:
53 filepath
= os
.path
.join(dirpath
, filename
)