[CI/Build] Fix pre-commit errors (#13696)

This commit is contained in:
Cyrus Leung
2025-02-22 00:31:26 -08:00
committed by GitHub
parent 105b8ce4c0
commit 7f6bae561c
6 changed files with 24 additions and 17 deletions
+4 -2
View File
@@ -1198,10 +1198,12 @@ class FlexibleArgumentParser(argparse.ArgumentParser):
try:
value = int(value)
except ValueError:
raise argparse.ArgumentTypeError("Port must be an integer")
msg = "Port must be an integer"
raise argparse.ArgumentTypeError(msg) from None
if not (1024 <= value <= 65535):
raise argparse.ArgumentTypeError("Port must be between 1024 and 65535")
raise argparse.ArgumentTypeError(
"Port must be between 1024 and 65535")
return value