potiuk commented on code in PR #34269:
URL: https://github.com/apache/airflow/pull/34269#discussion_r1321425653


##########
dev/breeze/src/airflow_breeze/commands/setup_commands.py:
##########
@@ -310,6 +334,20 @@ def get_command_hash_export() -> str:
                 
hashes.append(f"{command}:{dict_hash(current_command_hash_dict)}")
             else:
                 
hashes.append(f"{command}:{dict_hash(current_command_hash_dict)}")
+
+    duplicate_short_options: dict[str, list[str]] = {}
+    atleast_one_duplicate = False
+    # filter out the short options
+    for option in OPTIONS_COMMAND_MAP:
+        if len(option) == 2 and (not option.startswith("--")):
+            if len(OPTIONS_COMMAND_MAP[option]) > 1:
+                duplicate_short_options[option] = OPTIONS_COMMAND_MAP[option]
+                atleast_one_duplicate = True
+
+    if atleast_one_duplicate:
+        get_console().print(f"\n[error] {duplicate_short_options} have 
duplicate short hand commands\n")
+        sys.exit(1)

Review Comment:
   No. it's find. That command is used internally. By pre-commit to generate 
`hash` of all the commands and their parameters. Since it is part of 
pre-commit, failing it is pretty good indication that pre-commit failed. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to