Skip to content
This repository was archived by the owner on Mar 13, 2022. It is now read-only.

Commit e6f2092

Browse files
committed
Actually use the SKIP_FILES variable
Earlier this variable was defined as `skipped_ungenerated_files` but it wasn't actually used.
1 parent 1241f12 commit e6f2092

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

hack/boilerplate/boilerplate.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
import re
2525
import sys
2626

27+
# list all the files contain 'DO NOT EDIT', but are not generated
28+
SKIP_FILES = ['hack/boilerplate/boilerplate.py']
29+
2730
parser = argparse.ArgumentParser()
2831
parser.add_argument(
2932
"filenames",
@@ -132,10 +135,6 @@ def file_extension(filename):
132135
return os.path.splitext(filename)[1].split(".")[-1].lower()
133136

134137

135-
# list all the files contain 'DO NOT EDIT', but are not generated
136-
skipped_ungenerated_files = ['hack/boilerplate/boilerplate.py']
137-
138-
139138
def normalize_files(files):
140139
newfiles = []
141140
for pathname in files:
@@ -163,6 +162,8 @@ def get_files(extensions):
163162
extension = file_extension(pathname)
164163
if extension in extensions or basename in extensions:
165164
outfiles.append(pathname)
165+
166+
outfiles = list(set(outfiles) - set(normalize_files(SKIP_FILES)))
166167
return outfiles
167168

168169

0 commit comments

Comments
 (0)