This is an automated email from the ASF dual-hosted git repository. ephraimanierobi pushed a commit to branch v2-5-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 4451aba667e9a6abf9e0790fec6bc0b4106ebcaf Author: Jed Cunningham <[email protected]> AuthorDate: Wed Feb 1 18:54:38 2023 -0600 Fix `breeze static_checks` type arg (#29292) pre-commit does not support specifying multiple hooks to run, so I've removed support for multiple args in our static_checks command. (cherry picked from commit d80b583db07197c8c3d0549a805e83ceaaf10d52) --- dev/breeze/src/airflow_breeze/commands/developer_commands.py | 10 +++++----- images/breeze/output-commands-hash.txt | 2 +- images/breeze/output_static-checks.svg | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dev/breeze/src/airflow_breeze/commands/developer_commands.py b/dev/breeze/src/airflow_breeze/commands/developer_commands.py index 9db96edff7..3e2a54a700 100644 --- a/dev/breeze/src/airflow_breeze/commands/developer_commands.py +++ b/dev/breeze/src/airflow_breeze/commands/developer_commands.py @@ -373,9 +373,9 @@ def build_docs( @click.option( "-t", "--type", - help="Type(s) of the static checks to run (multiple can be added).", + "type_", + help="Type(s) of the static checks to run.", type=BetterChoice(PRE_COMMIT_LIST), - multiple=True, ) @click.option("-a", "--all-files", help="Run checks on all files.", is_flag=True) @click.option("-f", "--file", help="List of files to run the checks on.", type=click.Path(), multiple=True) @@ -404,7 +404,7 @@ def static_checks( show_diff_on_failure: bool, last_commit: bool, commit_ref: str, - type: tuple[str], + type_: str, file: Iterable[str], precommit_args: tuple, github_repository: str, @@ -415,8 +415,8 @@ def static_checks( if last_commit and commit_ref: get_console().print("\n[error]You cannot specify both --last-commit and --commit-ref[/]\n") sys.exit(1) - for single_check in type: - command_to_execute.append(single_check) + if type_: + command_to_execute.append(type_) if all_files: command_to_execute.append("--all-files") if show_diff_on_failure: diff --git a/images/breeze/output-commands-hash.txt b/images/breeze/output-commands-hash.txt index 46163a381d..4d5ffeb5fd 100644 --- a/images/breeze/output-commands-hash.txt +++ b/images/breeze/output-commands-hash.txt @@ -55,7 +55,7 @@ setup:version:123b462a421884dc2320ffc5e54b2478 setup:f383b9236f6141f95276136ccd9217f5 shell:affbf6f7f469408d0af47f75c6a38f6c start-airflow:109728919a0dd5c5ff5640ae86ba9e90 -static-checks:06708a5e0c50a6fc6cd18c2413431168 +static-checks:16ff0bbf7b8b2ca9ac7341b23b69b6f0 stop:e5aa686b4e53707ced4039d8414d5cd6 testing:docker-compose-tests:b86c044b24138af0659a05ed6331576c testing:helm-tests:94a442e7f3f63b34c4831a84d165690a diff --git a/images/breeze/output_static-checks.svg b/images/breeze/output_static-checks.svg index 7934d746c9..968779aab9 100644 --- a/images/breeze/output_static-checks.svg +++ b/images/breeze/output_static-checks.svg @@ -219,7 +219,7 @@ </text><text class="breeze-static-checks-r2" x="12.2" y="93.2" textLength="219.6" clip-path="url(#breeze-static-checks-line-3)">Run static checks.</text><text class="breeze-static-checks-r2" x="1464" y="93.2" textLength="12.2" clip-path="url(#breeze-static-checks-line-3)"> </text><text class="breeze-static-checks-r2" x="1464" y="117.6" textLength="12.2" clip-path="url(#breeze-static-checks-line-4)"> </text><text class="breeze-static-checks-r5" x="0" y="142" textLength="24.4" clip-path="url(#breeze-static-checks-line-5)">╭─</text><text class="breeze-static-checks-r5" x="24.4" y="142" textLength="219.6" clip-path="url(#breeze-static-checks-line-5)"> Pre-commit flags </text><text class="breeze-static-checks-r5" x="244" y="142" textLength="1195.6" clip-path="url(#breeze-static-checks-line-5)">──────────────────────────────────────────────────────────────────────────────── [...] -</text><text class="breeze-static-checks-r5" x="0" y="166.4" textLength="12.2" clip-path="url(#breeze-static-checks-line-6)">│</text><text class="breeze-static-checks-r4" x="24.4" y="166.4" textLength="12.2" clip-path="url(#breeze-static-checks-line-6)">-</text><text class="breeze-static-checks-r4" x="36.6" y="166.4" textLength="61" clip-path="url(#breeze-static-checks-line-6)">-type</text><text class="breeze-static-checks-r6" x="317.2" y="166.4" textLength="24.4" clip-path="url(#breeze- [...] +</text><text class="breeze-static-checks-r5" x="0" y="166.4" textLength="12.2" clip-path="url(#breeze-static-checks-line-6)">│</text><text class="breeze-static-checks-r4" x="24.4" y="166.4" textLength="12.2" clip-path="url(#breeze-static-checks-line-6)">-</text><text class="breeze-static-checks-r4" x="36.6" y="166.4" textLength="61" clip-path="url(#breeze-static-checks-line-6)">-type</text><text class="breeze-static-checks-r6" x="317.2" y="166.4" textLength="24.4" clip-path="url(#breeze- [...] </text><text class="breeze-static-checks-r5" x="0" y="190.8" textLength="12.2" clip-path="url(#breeze-static-checks-line-7)">│</text><text class="breeze-static-checks-r7" x="366" y="190.8" textLength="1073.6" clip-path="url(#breeze-static-checks-line-7)">(all | black | blacken-docs | check-airflow-config-yaml-consistent |                    </text><text c [...] </text><text class="breeze-static-checks-r5" x="0" y="215.2" textLength="12.2" clip-path="url(#breeze-static-checks-line-8)">│</text><text class="breeze-static-checks-r7" x="366" y="215.2" textLength="1073.6" clip-path="url(#breeze-static-checks-line-8)">check-airflow-provider-compatibility | check-apache-license-rat |                       </text><text class= [...] </text><text class="breeze-static-checks-r5" x="0" y="239.6" textLength="12.2" clip-path="url(#breeze-static-checks-line-9)">│</text><text class="breeze-static-checks-r7" x="366" y="239.6" textLength="1073.6" clip-path="url(#breeze-static-checks-line-9)">check-base-operator-partial-arguments | check-base-operator-usage |                     </text><text class="breeze-st [...]
