chore: clear typehinting errors in build scripts

This commit is contained in:
aclist committed 2026-11-12 12:01:59 +09:00
1 parent 77682cacd4
commit d2208787b4
5 files changed
+24 -20

No files matched your search

+7 -10
View File
@@ -3,14 +3,11 @@ import subprocess
import sys
cmd = ["git", "ls-files", "--others", "--exclude-standard"]
result = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True
result = subprocess.run(
cmd, capture_output=True, text=True
)
with open(".gitignore", "r") as f:
ignored = [line.rstrip() for line in f]
untracked = [os.path.basename(line.rstrip()) for line in result.stdout]
for file in untracked:
if not any(file in item for item in ignored):
print(f"File '{file}' is untracked. Add to .gitignore file if this is intended.")
sys.exit(1)
untracked = [os.path.basename(line.rstrip()) for line in result.stdout.splitlines()]
if bool(untracked):
print(f"The following files are untracked. Add to .gitignore if this is intended.")
print("\n".join(untracked))
sys.exit(1)