potiuk commented on a change in pull request #20848:
URL: https://github.com/apache/airflow/pull/20848#discussion_r790347249



##########
File path: dev/breeze/src/airflow_breeze/breeze.py
##########
@@ -276,6 +281,22 @@ def change_config(python, backend, cheatsheet, asciiart):
         console.print(f'[blue]Backend cached_value {backend}')
 
 
+@option_verbose
[email protected](name="static-check")
[email protected]('-t', '--type', type=click.Choice(PRE_COMMIT_LIST), 
multiple=True)
+def static_check(verbose: bool, type: Tuple[str]):
+    if check_package_installed('pre_commit'):
+        command_to_execute = ['pre-commit', 'run']
+        for single_check in type:
+            command_to_execute.append(single_check)
+        command_to_execute.append(EXTRA_STATIC_CHECK_OPTIONS)
+        output = run_command(

Review comment:
       I think we should also enable "forwarding unknown options" in this 
command. This way we could pass any other option of "pre-commit run" directly 
to it: 
   See 
https://click.palletsprojects.com/en/8.0.x/advanced/#forwarding-unknown-options
   
   What it should look like - we should be able to do:
   
   ```
   ./Breeze2 static-check --type mypy --from-ref HEAD^^^^ --to-ref HEAD^^^
   ```
   
   To check the 4-th commit back.




-- 
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