fix: allow us-ascii (#5731)
All checks were successful
continuous-integration/drone/push Build is passing

Co-authored-by: Darragh Elliott <me@delliott.net>
Reviewed-on: #5731
This commit was merged in pull request #5731.
This commit is contained in:
2026-02-26 13:14:17 +00:00
parent 6e595e8b60
commit d9343005b0

View File

@@ -25,7 +25,7 @@ def check(files: list[Path], pool: multiprocessing.pool.Pool) -> tuple[bool, str
failed_files: list[str] = []
for file in files:
encoding_result = run_command(["file", "-b", "--mime-encoding", str(file)])
if encoding_result not in ["utf-8", "ascii"]:
if encoding_result not in ["utf-8", "ascii", "us-ascii"]:
failed_files.append(f"{file} has invalid encoding {encoding_result}")
return len(failed_files) == 0, (
"\n".join(failed_files)