You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ep...@apache.org on 2022/05/19 18:18:08 UTC
[airflow] 08/10: Shorten max pre-commit hook name length (#23677)
This is an automated email from the ASF dual-hosted git repository.
ephraimanierobi pushed a commit to branch v2-3-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 7d4090d5fca3d9061f68468d19de4562aef64dd7
Author: Daniel Standish <15...@users.noreply.github.com>
AuthorDate: Thu May 12 11:46:56 2022 -0700
Shorten max pre-commit hook name length (#23677)
When names are too long, pre-commit output looks very ugly and takes up 2x lines. Here I reduce max length just a little bit further so that pre-commit output renders properly on a macbook pro 16" with terminal window splitting screen horizontally.
(cherry picked from commit c74e67a4ffb94ef5152b34fa96e88f1cbfe0c75a)
---
.pre-commit-config.yaml | 6 +-
STATIC_CODE_CHECKS.rst | 374 ++++++++++-----------
.../pre_commit_check_pre_commit_hooks.py | 6 +-
3 files changed, 194 insertions(+), 192 deletions(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 3fbf914d67..61043bc116 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -512,7 +512,7 @@ repos:
pass_filenames: true
- id: check-start-date-not-used-in-defaults
language: pygrep
- name: "'start_date' should not be defined in default_args in example_dags"
+ name: "'start_date' not to be defined in default_args in example_dags"
entry: "default_args\\s*=\\s*{\\s*(\"|')start_date(\"|')|(\"|')start_date(\"|'):"
files: \.*example_dags.*\.py$
exclude: ^airflow/_vendor/
@@ -603,10 +603,10 @@ repos:
- 'jsonpath-ng==1.5.3'
- 'rich>=12.4.1'
- id: check-pre-commit-information-consistent
- name: Update information about pre-commit hooks and verify ids and names
+ name: Update information re pre-commit hooks and verify ids and names
entry: ./scripts/ci/pre_commit/pre_commit_check_pre_commit_hooks.py
args:
- - --max-length=70
+ - --max-length=64
language: python
files: ^\.pre-commit-config\.yaml$|^scripts/ci/pre_commit/pre_commit_check_pre_commit_hook_names\.py$
additional_dependencies: ['pyyaml', 'jinja2', 'black==22.3.0', 'tabulate', 'rich>=12.4.1']
diff --git a/STATIC_CODE_CHECKS.rst b/STATIC_CODE_CHECKS.rst
index 38ce6e4e88..791b86b71f 100644
--- a/STATIC_CODE_CHECKS.rst
+++ b/STATIC_CODE_CHECKS.rst
@@ -125,193 +125,193 @@ require Breeze Docker images to be installed locally.
.. BEGIN AUTO-GENERATED STATIC CHECK LIST
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| ID | Description | Image |
-+========================================================+====================================================================+=========+
-| black | Run Black (the uncompromising Python code formatter) | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| blacken-docs | Run black on python code blocks in documentation files | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-airflow-2-1-compatibility | Check that providers are 2.1 compatible. | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-airflow-config-yaml-consistent | Checks for consistency between config.yml and default_config.cfg | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-airflow-providers-have-extras | Checks providers available when declared by extras in setup.py | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-apache-license-rat | Check if licenses are OK for Apache | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-base-operator-usage | * Check BaseOperator[Link] core imports | |
-| | * Check BaseOperator[Link] other imports | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-boring-cyborg-configuration | Checks for Boring Cyborg configuration consistency | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-breeze-top-dependencies-limited | Breeze should have small number of top-level dependencies | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-builtin-literals | Require literal syntax when initializing Python builtin types | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-changelog-has-no-duplicates | Check changelogs for duplicate entries | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-daysago-import-from-utils | Make sure days_ago is imported from airflow.utils.dates | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-docstring-param-types | Check that docstrings do not specify param types | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-executables-have-shebangs | Check that executables have shebang | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-extra-packages-references | Checks setup extra packages | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-extras-order | Check order of extras in Dockerfile | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-for-inclusive-language | Check for language that we do not accept as community | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-hooks-apply | Check if all hooks apply to the repository | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-incorrect-use-of-LoggingMixin | Make sure LoggingMixin is not used alone | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-integrations-are-consistent | Check if integration list is consistent in various places | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-merge-conflict | Check that merge conflicts are not being committed | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-newsfragments-are-valid | Check newsfragments are valid | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-no-providers-in-core-examples | No providers imports in core example DAGs | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-no-relative-imports | No relative imports | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-persist-credentials-disabled-in-github-workflows | Check that workflow files have persist-credentials disabled | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-pre-commit-information-consistent | Update information about pre-commit hooks and verify ids and names | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-provide-create-sessions-imports | Check provide_session and create_session imports | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-provider-yaml-valid | Validate providers.yaml files | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-providers-init-file-missing | Provider init file is missing | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-providers-subpackages-init-file-exist | Provider subpackage init files are there | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-pydevd-left-in-code | Check for pydevd debug statements accidentally left | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-revision-heads-map | Check that the REVISION_HEADS_MAP is up-to-date | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-safe-filter-usage-in-html | Don't use safe in templates | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-setup-order | Check order of dependencies in setup.cfg and setup.py | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-start-date-not-used-in-defaults | 'start_date' should not be defined in default_args in example_dags | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-system-tests-present | Check if system tests have required segments of code | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| check-xml | Check XML files with xmllint | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| codespell | Run codespell to check for common misspellings in files | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| debug-statements | Detect accidentally committed debug statements | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| detect-private-key | Detect if private key is added to the repository | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| doctoc | Add TOC for md and rst files | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| end-of-file-fixer | Make sure that there is an empty line at the end | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| fix-encoding-pragma | Remove encoding header from python files | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| flynt | Run flynt string format converter for Python | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| forbid-tabs | Fail if tabs are used in the project | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| identity | Print input to the static check hooks for troubleshooting | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| insert-license | * Add license for all SQL files | |
-| | * Add license for all rst files | |
-| | * Add license for all CSS/JS/PUML/TS/TSX files | |
-| | * Add license for all JINJA template files | |
-| | * Add license for all shell files | |
-| | * Add license for all Python files | |
-| | * Add license for all XML files | |
-| | * Add license for all YAML files | |
-| | * Add license for all md files | |
-| | * Add license for all other files | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| isort | Run isort to sort imports in Python files | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| lint-chart-schema | Lint chart/values.schema.json file | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| lint-css | stylelint | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| lint-dockerfile | Lint dockerfile | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| lint-helm-chart | Lint Helm Chart | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| lint-javascript | * ESLint against airflow/ui | |
-| | * ESLint against current UI JavaScript files | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| lint-json-schema | * Lint JSON Schema files with JSON Schema | |
-| | * Lint NodePort Service with JSON Schema | |
-| | * Lint Docker compose files with JSON Schema | |
-| | * Lint chart/values.schema.json file with JSON Schema | |
-| | * Lint chart/values.yaml file with JSON Schema | |
-| | * Lint airflow/config_templates/config.yml file with JSON Schema | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| lint-markdown | Run markdownlint | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| lint-openapi | * Lint OpenAPI using spectral | |
-| | * Lint OpenAPI using openapi-spec-validator | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| mixed-line-ending | Detect if mixed line ending is used (\r vs. \r\n) | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| pretty-format-json | Format json files | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| pydocstyle | Run pydocstyle | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| python-no-log-warn | Check if there are no deprecate log warn | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| pyupgrade | Upgrade Python code automatically | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| rst-backticks | Check if RST files use double backticks for code | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| run-flake8 | Run flake8 | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| run-mypy | * Run mypy for dev | |
-| | * Run mypy for core | |
-| | * Run mypy for providers | |
-| | * Run mypy for /docs/ folder | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| run-shellcheck | Check Shell scripts syntax correctness | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| static-check-autoflake | Remove all unused code | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| trailing-whitespace | Remove trailing whitespace at end of line | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| update-breeze-file | Update output of breeze commands in BREEZE.rst | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| update-breeze-readme-config-hash | Update Breeze README.md with config files hash | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| update-extras | Update extras in documentation | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| update-in-the-wild-to-be-sorted | Sort INTHEWILD.md alphabetically | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| update-inlined-dockerfile-scripts | Inline Dockerfile and Dockerfile.ci scripts | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| update-local-yml-file | Update mounts in the local yml file | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| update-migration-references | Update migration ref doc | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| update-providers-dependencies | Update cross-dependencies for providers packages | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| update-setup-cfg-file | Update setup.cfg file with all licenses | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| update-spelling-wordlist-to-be-sorted | Sort alphabetically and uniquify spelling_wordlist.txt | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| update-supported-versions | Updates supported versions in documentation | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| update-vendored-in-k8s-json-schema | Vendor k8s definitions into values.schema.json | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| update-version | Update version to the latest version in the documentation | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| yamllint | Check YAML files with yamllint | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
-| yesqa | Remove unnecessary noqa statements | |
-+--------------------------------------------------------+--------------------------------------------------------------------+---------+
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| ID | Description | Image |
++========================================================+==================================================================+=========+
+| black | Run Black (the uncompromising Python code formatter) | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| blacken-docs | Run black on python code blocks in documentation files | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-airflow-2-1-compatibility | Check that providers are 2.1 compatible. | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-airflow-config-yaml-consistent | Checks for consistency between config.yml and default_config.cfg | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-airflow-providers-have-extras | Checks providers available when declared by extras in setup.py | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-apache-license-rat | Check if licenses are OK for Apache | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-base-operator-usage | * Check BaseOperator[Link] core imports | |
+| | * Check BaseOperator[Link] other imports | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-boring-cyborg-configuration | Checks for Boring Cyborg configuration consistency | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-breeze-top-dependencies-limited | Breeze should have small number of top-level dependencies | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-builtin-literals | Require literal syntax when initializing Python builtin types | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-changelog-has-no-duplicates | Check changelogs for duplicate entries | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-daysago-import-from-utils | Make sure days_ago is imported from airflow.utils.dates | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-docstring-param-types | Check that docstrings do not specify param types | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-executables-have-shebangs | Check that executables have shebang | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-extra-packages-references | Checks setup extra packages | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-extras-order | Check order of extras in Dockerfile | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-for-inclusive-language | Check for language that we do not accept as community | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-hooks-apply | Check if all hooks apply to the repository | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-incorrect-use-of-LoggingMixin | Make sure LoggingMixin is not used alone | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-integrations-are-consistent | Check if integration list is consistent in various places | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-merge-conflict | Check that merge conflicts are not being committed | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-newsfragments-are-valid | Check newsfragments are valid | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-no-providers-in-core-examples | No providers imports in core example DAGs | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-no-relative-imports | No relative imports | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-persist-credentials-disabled-in-github-workflows | Check that workflow files have persist-credentials disabled | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-pre-commit-information-consistent | Update information re pre-commit hooks and verify ids and names | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-provide-create-sessions-imports | Check provide_session and create_session imports | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-provider-yaml-valid | Validate providers.yaml files | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-providers-init-file-missing | Provider init file is missing | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-providers-subpackages-init-file-exist | Provider subpackage init files are there | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-pydevd-left-in-code | Check for pydevd debug statements accidentally left | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-revision-heads-map | Check that the REVISION_HEADS_MAP is up-to-date | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-safe-filter-usage-in-html | Don't use safe in templates | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-setup-order | Check order of dependencies in setup.cfg and setup.py | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-start-date-not-used-in-defaults | 'start_date' not to be defined in default_args in example_dags | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-system-tests-present | Check if system tests have required segments of code | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| check-xml | Check XML files with xmllint | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| codespell | Run codespell to check for common misspellings in files | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| debug-statements | Detect accidentally committed debug statements | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| detect-private-key | Detect if private key is added to the repository | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| doctoc | Add TOC for md and rst files | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| end-of-file-fixer | Make sure that there is an empty line at the end | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| fix-encoding-pragma | Remove encoding header from python files | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| flynt | Run flynt string format converter for Python | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| forbid-tabs | Fail if tabs are used in the project | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| identity | Print input to the static check hooks for troubleshooting | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| insert-license | * Add license for all SQL files | |
+| | * Add license for all rst files | |
+| | * Add license for all CSS/JS/PUML/TS/TSX files | |
+| | * Add license for all JINJA template files | |
+| | * Add license for all shell files | |
+| | * Add license for all Python files | |
+| | * Add license for all XML files | |
+| | * Add license for all YAML files | |
+| | * Add license for all md files | |
+| | * Add license for all other files | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| isort | Run isort to sort imports in Python files | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| lint-chart-schema | Lint chart/values.schema.json file | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| lint-css | stylelint | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| lint-dockerfile | Lint dockerfile | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| lint-helm-chart | Lint Helm Chart | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| lint-javascript | * ESLint against airflow/ui | |
+| | * ESLint against current UI JavaScript files | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| lint-json-schema | * Lint JSON Schema files with JSON Schema | |
+| | * Lint NodePort Service with JSON Schema | |
+| | * Lint Docker compose files with JSON Schema | |
+| | * Lint chart/values.schema.json file with JSON Schema | |
+| | * Lint chart/values.yaml file with JSON Schema | |
+| | * Lint airflow/config_templates/config.yml file with JSON Schema | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| lint-markdown | Run markdownlint | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| lint-openapi | * Lint OpenAPI using spectral | |
+| | * Lint OpenAPI using openapi-spec-validator | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| mixed-line-ending | Detect if mixed line ending is used (\r vs. \r\n) | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| pretty-format-json | Format json files | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| pydocstyle | Run pydocstyle | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| python-no-log-warn | Check if there are no deprecate log warn | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| pyupgrade | Upgrade Python code automatically | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| rst-backticks | Check if RST files use double backticks for code | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| run-flake8 | Run flake8 | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| run-mypy | * Run mypy for dev | |
+| | * Run mypy for core | |
+| | * Run mypy for providers | |
+| | * Run mypy for /docs/ folder | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| run-shellcheck | Check Shell scripts syntax correctness | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| static-check-autoflake | Remove all unused code | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| trailing-whitespace | Remove trailing whitespace at end of line | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| update-breeze-file | Update output of breeze commands in BREEZE.rst | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| update-breeze-readme-config-hash | Update Breeze README.md with config files hash | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| update-extras | Update extras in documentation | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| update-in-the-wild-to-be-sorted | Sort INTHEWILD.md alphabetically | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| update-inlined-dockerfile-scripts | Inline Dockerfile and Dockerfile.ci scripts | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| update-local-yml-file | Update mounts in the local yml file | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| update-migration-references | Update migration ref doc | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| update-providers-dependencies | Update cross-dependencies for providers packages | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| update-setup-cfg-file | Update setup.cfg file with all licenses | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| update-spelling-wordlist-to-be-sorted | Sort alphabetically and uniquify spelling_wordlist.txt | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| update-supported-versions | Updates supported versions in documentation | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| update-vendored-in-k8s-json-schema | Vendor k8s definitions into values.schema.json | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| update-version | Update version to the latest version in the documentation | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| yamllint | Check YAML files with yamllint | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
+| yesqa | Remove unnecessary noqa statements | |
++--------------------------------------------------------+------------------------------------------------------------------+---------+
.. END AUTO-GENERATED STATIC CHECK LIST
diff --git a/scripts/ci/pre_commit/pre_commit_check_pre_commit_hooks.py b/scripts/ci/pre_commit/pre_commit_check_pre_commit_hooks.py
index 8c43addd20..9855091ba8 100755
--- a/scripts/ci/pre_commit/pre_commit_check_pre_commit_hooks.py
+++ b/scripts/ci/pre_commit/pre_commit_check_pre_commit_hooks.py
@@ -59,12 +59,14 @@ def get_errors_and_hooks(content: Any, max_length: int) -> Tuple[List[str], Dict
if hook_id == 'mypy':
needs_image = True
if 'name' not in hook:
- errors.append(f"Name is missing in hook {hook_id} in {PRE_COMMIT_YAML_FILE}. Please add it!")
+ errors.append(
+ f"Name is missing in hook `{hook_id}` in {PRE_COMMIT_YAML_FILE}. Please add it!"
+ )
continue
name = hook['name']
if len(name) > max_length:
errors.append(
- f"Name is too long for hook {hook_id} in {PRE_COMMIT_YAML_FILE}. Please shorten it!"
+ f"Name is too long for hook `{hook_id}` in {PRE_COMMIT_YAML_FILE}. Please shorten it!"
)
continue
hooks[hook_id].append(name)