Bowrna commented on a change in pull request #20848:
URL: https://github.com/apache/airflow/pull/20848#discussion_r792307427
##########
File path: dev/breeze/src/airflow_breeze/breeze.py
##########
@@ -312,6 +313,47 @@ def build_docs(verbose: bool, docs_only: bool,
spellcheck_only: bool, package_fi
build_documentation.build(verbose, mount_all_flag, airflow_sources,
ci_image_name, doc_builder)
+@option_verbose
[email protected](
+ name="static-check",
+ context_settings=dict(
+ ignore_unknown_options=True,
+ allow_extra_args=True,
+ ),
+)
[email protected]('--all-files', is_flag=True)
[email protected]('--show-diff-on-failure', is_flag=True)
[email protected]('--last-commit', is_flag=True)
[email protected]('-t', '--type', type=click.Choice(PRE_COMMIT_LIST),
multiple=True)
[email protected]('--files', is_flag=True)
[email protected]('precommit_args', nargs=-1, type=click.UNPROCESSED)
+def static_check(
+ verbose: bool,
+ all_files: bool,
+ show_diff_on_failure: bool,
+ last_commit: bool,
+ type: Tuple[str],
+ files: bool,
+ precommit_args: Tuple,
+):
+ 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)
Review comment:
@potiuk I have commented the above code `EXTRA_STATIC_CHECK_OPTIONS `
where I have passed `--show-diff-on-failure` by default even when that flag is
not set.
Do we have to set `--show-diff-on-failure` flag as true by default or only
when passed as flag?
--
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]