Fix regexp to not have too wide range (#47819)
This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 56e0eed45b1 Fix regexp to not have too wide range (#47819)
56e0eed45b1 is described below
commit 56e0eed45b1abe7c16f5de4cfd527f17bedf7ed0
Author: Jarek Potiuk
AuthorDate: Sat Mar 15 22:44:20 2025 +0100
Fix regexp to not have too wide range (#47819)
The regexp (detected by CodeQL) had too wide range of chars (it
was intended to only have A-Z.
---
tests/cli/test_cli_parser.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/cli/test_cli_parser.py b/tests/cli/test_cli_parser.py
index d50914c3adc..427460c9336 100644
--- a/tests/cli/test_cli_parser.py
+++ b/tests/cli/test_cli_parser.py
@@ -51,7 +51,7 @@ pytestmark = pytest.mark.db_test
# Can not be `--snake_case` or contain uppercase letter
ILLEGAL_LONG_OPTION_PATTERN = re.compile("^--[a-z]+_[a-z]+|^--.*[A-Z].*")
# Only can be `-[a-z]` or `-[A-Z]`
-LEGAL_SHORT_OPTION_PATTERN = re.compile("^-[a-zA-z]$")
+LEGAL_SHORT_OPTION_PATTERN = re.compile("^-[a-zA-Z]$")
cli_args = {k: v for k, v in cli_parser.__dict__.items() if
k.startswith("ARG_")}
Read more here: Source link
