Skip to content

Commit 0e157c7

Browse files
aegilopsCopilot
andauthored
Update python_lint.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 6738165 commit 0e157c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python_lint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ def main() -> None:
770770
logging.basicConfig(level=logging.DEBUG if args.debug else logging.INFO)
771771

772772
if any({linter not in LINTERS for linter in args.linter}):
773-
sanitized_linter = [linter.replace('\n', '').replace('\r', '') for linter in args.linter]
773+
sanitized_linter = [re.sub(r'[\x00-\x1F]', '', linter) for linter in args.linter]
774774
LOG.error("Invalid linter choice: %s", ', '.join(sanitized_linter))
775775
sys.exit(1)
776776

0 commit comments

Comments
 (0)