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 587b14456925d182f7eaadd2bc625d57c1953c79 Author: Jarek Potiuk <[email protected]> AuthorDate: Sat Dec 24 16:08:40 2022 +0100 Update black version automatically in pre-commit configuration (#28578) Follow up after #28576 (cherry picked from commit 11575931e6d1f824154c84f71fb1dc77dd1b638f) --- .pre-commit-config.yaml | 15 +++++-- STATIC_CODE_CHECKS.rst | 2 + dev/breeze/src/airflow_breeze/pre_commit_ids.py | 1 + images/breeze/output-commands-hash.txt | 2 +- images/breeze/output_static-checks.svg | 48 ++++++++++++---------- images/breeze/output_stop.svg | 24 +++++------ .../pre_commit/pre_commit_update_black_version.py | 37 +++++++++++++++++ 7 files changed, 91 insertions(+), 38 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e188a72a5d..93ca966d0b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -146,12 +146,21 @@ repos: - --fuzzy-match-generates-todo files: > \.cfg$|\.conf$|\.ini$|\.ldif$|\.properties$|\.readthedocs$|\.service$|\.tf$|Dockerfile.*$ + - repo: local + hooks: + - id: update-black-version + name: Update black versions everywhere + entry: ./scripts/ci/pre_commit/pre_commit_update_black_version.py + language: python + files: ^.pre-commit-config.yaml$ + additional_dependencies: ['pyyaml'] + pass_filenames: false + require_serial: true - repo: https://github.com/PyCQA/isort rev: 5.11.2 hooks: - id: isort name: Run isort to sort imports in Python files - # Keep version of black in sync wit blacken-docs and pre-commit-hook-names - repo: https://github.com/psf/black rev: 22.12.0 hooks: @@ -171,7 +180,7 @@ repos: - --target-version=py39 - --target-version=py310 alias: black - additional_dependencies: [black==22.3.0] + additional_dependencies: [black==22.12.0] - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.2.0 hooks: @@ -649,7 +658,7 @@ repos: - --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.4'] + additional_dependencies: ['pyyaml', 'jinja2', 'black==22.12.0', 'tabulate', 'rich>=12.4.4'] require_serial: true pass_filenames: false - id: update-breeze-readme-config-hash diff --git a/STATIC_CODE_CHECKS.rst b/STATIC_CODE_CHECKS.rst index 8433fa3395..1b4732cd44 100644 --- a/STATIC_CODE_CHECKS.rst +++ b/STATIC_CODE_CHECKS.rst @@ -311,6 +311,8 @@ require Breeze Docker image to be build locally. +-----------------------------------------------------------+------------------------------------------------------------------+---------+ | ts-compile-and-lint-javascript | TS types generation and ESLint against current UI files | | +-----------------------------------------------------------+------------------------------------------------------------------+---------+ +| update-black-version | Update black versions everywhere | | ++-----------------------------------------------------------+------------------------------------------------------------------+---------+ | update-breeze-cmd-output | Update output of breeze commands in BREEZE.rst | | +-----------------------------------------------------------+------------------------------------------------------------------+---------+ | update-breeze-readme-config-hash | Update Breeze README.md with config files hash | | diff --git a/dev/breeze/src/airflow_breeze/pre_commit_ids.py b/dev/breeze/src/airflow_breeze/pre_commit_ids.py index 4914cb0914..851e68be39 100644 --- a/dev/breeze/src/airflow_breeze/pre_commit_ids.py +++ b/dev/breeze/src/airflow_breeze/pre_commit_ids.py @@ -99,6 +99,7 @@ PRE_COMMIT_LIST = [ "static-check-autoflake", "trailing-whitespace", "ts-compile-and-lint-javascript", + "update-black-version", "update-breeze-cmd-output", "update-breeze-readme-config-hash", "update-er-diagram", diff --git a/images/breeze/output-commands-hash.txt b/images/breeze/output-commands-hash.txt index b721a519c5..3ac57898ce 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:7a39e28c87fbca0a9fae0ebfe1591b71 +static-checks:6c18cfc471ad4118a11fc84d41abb747 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 3cd8b66bbc..87a81e7c32 100644 --- a/images/breeze/output_static-checks.svg +++ b/images/breeze/output_static-checks.svg @@ -1,4 +1,4 @@ -<svg class="rich-terminal" viewBox="0 0 1482 1343.1999999999998" xmlns="http://www.w3.org/2000/svg"> +<svg class="rich-terminal" viewBox="0 0 1482 1367.6" xmlns="http://www.w3.org/2000/svg"> <!-- Generated with Rich https://www.textualize.io --> <style> @@ -43,7 +43,7 @@ <defs> <clipPath id="breeze-static-checks-clip-terminal"> - <rect x="0" y="0" width="1463.0" height="1292.1999999999998" /> + <rect x="0" y="0" width="1463.0" height="1316.6" /> </clipPath> <clipPath id="breeze-static-checks-line-0"> <rect x="0" y="1.5" width="1464" height="24.65"/> @@ -201,9 +201,12 @@ <clipPath id="breeze-static-checks-line-51"> <rect x="0" y="1245.9" width="1464" height="24.65"/> </clipPath> +<clipPath id="breeze-static-checks-line-52"> + <rect x="0" y="1270.3" width="1464" height="24.65"/> + </clipPath> </defs> - <rect fill="#292929" stroke="rgba(255,255,255,0.35)" stroke-width="1" x="1" y="1" width="1480" height="1341.2" rx="8"/><text class="breeze-static-checks-title" fill="#c5c8c6" text-anchor="middle" x="740" y="27">Command: static-checks</text> + <rect fill="#292929" stroke="rgba(255,255,255,0.35)" stroke-width="1" x="1" y="1" width="1480" height="1365.6" rx="8"/><text class="breeze-static-checks-title" fill="#c5c8c6" text-anchor="middle" x="740" y="27">Command: static-checks</text> <g transform="translate(26,22)"> <circle cx="0" cy="0" r="7" fill="#ff5f57"/> <circle cx="22" cy="0" r="7" fill="#febc2e"/> @@ -247,25 +250,26 @@ </text><text class="breeze-static-checks-r5" x="0" y="776.4" textLength="12.2" clip-path="url(#breeze-static-checks-line-31)">│</text><text class="breeze-static-checks-r7" x="366" y="776.4" textLength="1073.6" clip-path="url(#breeze-static-checks-line-31)">pretty-format-json | pydocstyle | python-no-log-warn | pyupgrade |                      </ [...] </text><text class="breeze-static-checks-r5" x="0" y="800.8" textLength="12.2" clip-path="url(#breeze-static-checks-line-32)">│</text><text class="breeze-static-checks-r7" x="366" y="800.8" textLength="1073.6" clip-path="url(#breeze-static-checks-line-32)">replace-bad-characters | rst-backticks | run-flake8 | run-mypy | run-shellcheck |       </text><text class="breeze-static-checks-r5" x="1451.8" y="800.8" t [...] </text><text class="breeze-static-checks-r5" x="0" y="825.2" textLength="12.2" clip-path="url(#breeze-static-checks-line-33)">│</text><text class="breeze-static-checks-r7" x="366" y="825.2" textLength="1073.6" clip-path="url(#breeze-static-checks-line-33)">static-check-autoflake | trailing-whitespace | ts-compile-and-lint-javascript |         </text><text class="breeze-static-checks-r5" x="1451.8" y="825.2" textLength= [...] -</text><text class="breeze-static-checks-r5" x="0" y="849.6" textLength="12.2" clip-path="url(#breeze-static-checks-line-34)">│</text><text class="breeze-static-checks-r7" x="366" y="849.6" textLength="1073.6" clip-path="url(#breeze-static-checks-line-34)">update-breeze-cmd-output | update-breeze-readme-config-hash | update-er-diagram |       </text><text class="breeze-static-checks-r5" x="1451.8" y="849.6" textLength="12.2" cli [...] -</text><text class="breeze-static-checks-r5" x="0" y="874" textLength="12.2" clip-path="url(#breeze-static-checks-line-35)">│</text><text class="breeze-static-checks-r7" x="366" y="874" textLength="1073.6" clip-path="url(#breeze-static-checks-line-35)">update-extras | update-in-the-wild-to-be-sorted | update-inlined-dockerfile-scripts |   </text><text class="breeze-static-checks-r5" x="1451.8" y="874" textLength="12.2" clip-path="url(#breeze-static [...] -</text><text class="breeze-static-checks-r5" x="0" y="898.4" textLength="12.2" clip-path="url(#breeze-static-checks-line-36)">│</text><text class="breeze-static-checks-r7" x="366" y="898.4" textLength="1073.6" clip-path="url(#breeze-static-checks-line-36)">update-local-yml-file | update-migration-references | update-providers-dependencies |   </text><text class="breeze-static-checks-r5" x="1451.8" y="898.4" textLength="12.2" clip-path="url(#breeze- [...] -</text><text class="breeze-static-checks-r5" x="0" y="922.8" textLength="12.2" clip-path="url(#breeze-static-checks-line-37)">│</text><text class="breeze-static-checks-r7" x="366" y="922.8" textLength="1073.6" clip-path="url(#breeze-static-checks-line-37)">update-spelling-wordlist-to-be-sorted | update-supported-versions |                     </text><text class="breeze- [...] -</text><text class="breeze-static-checks-r5" x="0" y="947.2" textLength="12.2" clip-path="url(#breeze-static-checks-line-38)">│</text><text class="breeze-static-checks-r7" x="366" y="947.2" textLength="1073.6" clip-path="url(#breeze-static-checks-line-38)">update-vendored-in-k8s-json-schema | update-version | yamllint | yesqa)                 </text><text class="breeze-stati [...] -</text><text class="breeze-static-checks-r5" x="0" y="971.6" textLength="12.2" clip-path="url(#breeze-static-checks-line-39)">│</text><text class="breeze-static-checks-r4" x="24.4" y="971.6" textLength="12.2" clip-path="url(#breeze-static-checks-line-39)">-</text><text class="breeze-static-checks-r4" x="36.6" y="971.6" textLength="61" clip-path="url(#breeze-static-checks-line-39)">-file</text><text class="breeze-static-checks-r6" x="317.2" y="971.6" textLength="24.4" clip-path="url(#bree [...] -</text><text class="breeze-static-checks-r5" x="0" y="996" textLength="12.2" clip-path="url(#breeze-static-checks-line-40)">│</text><text class="breeze-static-checks-r4" x="24.4" y="996" textLength="12.2" clip-path="url(#breeze-static-checks-line-40)">-</text><text class="breeze-static-checks-r4" x="36.6" y="996" textLength="48.8" clip-path="url(#breeze-static-checks-line-40)">-all</text><text class="breeze-static-checks-r4" x="85.4" y="996" textLength="73.2" clip-path="url(#breeze-stati [...] -</text><text class="breeze-static-checks-r5" x="0" y="1020.4" textLength="12.2" clip-path="url(#breeze-static-checks-line-41)">│</text><text class="breeze-static-checks-r4" x="24.4" y="1020.4" textLength="12.2" clip-path="url(#breeze-static-checks-line-41)">-</text><text class="breeze-static-checks-r4" x="36.6" y="1020.4" textLength="61" clip-path="url(#breeze-static-checks-line-41)">-show</text><text class="breeze-static-checks-r4" x="97.6" y="1020.4" textLength="195.2" clip-path="url(# [...] -</text><text class="breeze-static-checks-r5" x="0" y="1044.8" textLength="12.2" clip-path="url(#breeze-static-checks-line-42)">│</text><text class="breeze-static-checks-r4" x="24.4" y="1044.8" textLength="12.2" clip-path="url(#breeze-static-checks-line-42)">-</text><text class="breeze-static-checks-r4" x="36.6" y="1044.8" textLength="61" clip-path="url(#breeze-static-checks-line-42)">-last</text><text class="breeze-static-checks-r4" x="97.6" y="1044.8" textLength="85.4" clip-path="url(#b [...] -</text><text class="breeze-static-checks-r5" x="0" y="1069.2" textLength="12.2" clip-path="url(#breeze-static-checks-line-43)">│</text><text class="breeze-static-checks-r4" x="24.4" y="1069.2" textLength="12.2" clip-path="url(#breeze-static-checks-line-43)">-</text><text class="breeze-static-checks-r4" x="36.6" y="1069.2" textLength="85.4" clip-path="url(#breeze-static-checks-line-43)">-commit</text><text class="breeze-static-checks-r4" x="122" y="1069.2" textLength="48.8" clip-path="url [...] -</text><text class="breeze-static-checks-r5" x="0" y="1093.6" textLength="12.2" clip-path="url(#breeze-static-checks-line-44)">│</text><text class="breeze-static-checks-r2" x="366" y="1093.6" textLength="292.8" clip-path="url(#breeze-static-checks-line-44)">Mutually exclusive with </text><text class="breeze-static-checks-r4" x="658.8" y="1093.6" textLength="12.2" clip-path="url(#breeze-static-checks-line-44)">-</text><text class="breeze-static-checks-r4" x="671" y="1093.6" [...] -</text><text class="breeze-static-checks-r5" x="0" y="1118" textLength="12.2" clip-path="url(#breeze-static-checks-line-45)">│</text><text class="breeze-static-checks-r7" x="366" y="1118" textLength="1073.6" clip-path="url(#breeze-static-checks-line-45)">(TEXT)                                       [...] -</text><text class="breeze-static-checks-r5" x="0" y="1142.4" textLength="12.2" clip-path="url(#breeze-static-checks-line-46)">│</text><text class="breeze-static-checks-r4" x="24.4" y="1142.4" textLength="12.2" clip-path="url(#breeze-static-checks-line-46)">-</text><text class="breeze-static-checks-r4" x="36.6" y="1142.4" textLength="85.4" clip-path="url(#breeze-static-checks-line-46)">-github</text><text class="breeze-static-checks-r4" x="122" y="1142.4" textLength="134.2" clip-path="ur [...] -</text><text class="breeze-static-checks-r5" x="0" y="1166.8" textLength="1464" clip-path="url(#breeze-static-checks-line-47)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text class="breeze-static-checks-r2" x="1464" y="1166.8" textLength="12.2" clip-path="url(#breeze-static-checks-line-47)"> -</text><text class="breeze-static-checks-r5" x="0" y="1191.2" textLength="24.4" clip-path="url(#breeze-static-checks-line-48)">╭─</text><text class="breeze-static-checks-r5" x="24.4" y="1191.2" textLength="195.2" clip-path="url(#breeze-static-checks-line-48)"> Common options </text><text class="breeze-static-checks-r5" x="219.6" y="1191.2" textLength="1220" clip-path="url(#breeze-static-checks-line-48)">────────────────────────────────────────────────────────────────────── [...] -</text><text class="breeze-static-checks-r5" x="0" y="1215.6" textLength="12.2" clip-path="url(#breeze-static-checks-line-49)">│</text><text class="breeze-static-checks-r4" x="24.4" y="1215.6" textLength="12.2" clip-path="url(#breeze-static-checks-line-49)">-</text><text class="breeze-static-checks-r4" x="36.6" y="1215.6" textLength="97.6" clip-path="url(#breeze-static-checks-line-49)">-verbose</text><text class="breeze-static-checks-r6" x="158.6" y="1215.6" textLength="24.4" clip-path=" [...] -</text><text class="breeze-static-checks-r5" x="0" y="1240" textLength="12.2" clip-path="url(#breeze-static-checks-line-50)">│</text><text class="breeze-static-checks-r4" x="24.4" y="1240" textLength="12.2" clip-path="url(#breeze-static-checks-line-50)">-</text><text class="breeze-static-checks-r4" x="36.6" y="1240" textLength="48.8" clip-path="url(#breeze-static-checks-line-50)">-dry</text><text class="breeze-static-checks-r4" x="85.4" y="1240" textLength="48.8" clip-path="url(#breeze-s [...] -</text><text class="breeze-static-checks-r5" x="0" y="1264.4" textLength="12.2" clip-path="url(#breeze-static-checks-line-51)">│</text><text class="breeze-static-checks-r4" x="24.4" y="1264.4" textLength="12.2" clip-path="url(#breeze-static-checks-line-51)">-</text><text class="breeze-static-checks-r4" x="36.6" y="1264.4" textLength="61" clip-path="url(#breeze-static-checks-line-51)">-help</text><text class="breeze-static-checks-r6" x="158.6" y="1264.4" textLength="24.4" clip-path="url(# [...] -</text><text class="breeze-static-checks-r5" x="0" y="1288.8" textLength="1464" clip-path="url(#breeze-static-checks-line-52)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text class="breeze-static-checks-r2" x="1464" y="1288.8" textLength="12.2" clip-path="url(#breeze-static-checks-line-52)"> +</text><text class="breeze-static-checks-r5" x="0" y="849.6" textLength="12.2" clip-path="url(#breeze-static-checks-line-34)">│</text><text class="breeze-static-checks-r7" x="366" y="849.6" textLength="1073.6" clip-path="url(#breeze-static-checks-line-34)">update-black-version | update-breeze-cmd-output | update-breeze-readme-config-hash |    </text><text class="breeze-static-checks-r5" x="1451.8" y="849.6" textLength="12.2" clip-path="url(#br [...] +</text><text class="breeze-static-checks-r5" x="0" y="874" textLength="12.2" clip-path="url(#breeze-static-checks-line-35)">│</text><text class="breeze-static-checks-r7" x="366" y="874" textLength="1073.6" clip-path="url(#breeze-static-checks-line-35)">update-er-diagram | update-extras | update-in-the-wild-to-be-sorted |                   </text><text class="breeze-stat [...] +</text><text class="breeze-static-checks-r5" x="0" y="898.4" textLength="12.2" clip-path="url(#breeze-static-checks-line-36)">│</text><text class="breeze-static-checks-r7" x="366" y="898.4" textLength="1073.6" clip-path="url(#breeze-static-checks-line-36)">update-inlined-dockerfile-scripts | update-local-yml-file | update-migration-references </text><text class="breeze-static-checks-r5" x="1451.8" y="898.4" textLength="12.2" clip-path="url(#breeze-static-checks-l [...] +</text><text class="breeze-static-checks-r5" x="0" y="922.8" textLength="12.2" clip-path="url(#breeze-static-checks-line-37)">│</text><text class="breeze-static-checks-r7" x="366" y="922.8" textLength="1073.6" clip-path="url(#breeze-static-checks-line-37)">| update-providers-dependencies | update-spelling-wordlist-to-be-sorted |               </text><text class="breeze-static-checks-r5" x="1451 [...] +</text><text class="breeze-static-checks-r5" x="0" y="947.2" textLength="12.2" clip-path="url(#breeze-static-checks-line-38)">│</text><text class="breeze-static-checks-r7" x="366" y="947.2" textLength="1073.6" clip-path="url(#breeze-static-checks-line-38)">update-supported-versions | update-vendored-in-k8s-json-schema | update-version |       </text><text class="breeze-static-checks-r5" x="1451.8" y="947.2" textLength="12.2" cli [...] +</text><text class="breeze-static-checks-r5" x="0" y="971.6" textLength="12.2" clip-path="url(#breeze-static-checks-line-39)">│</text><text class="breeze-static-checks-r7" x="366" y="971.6" textLength="1073.6" clip-path="url(#breeze-static-checks-line-39)">yamllint | yesqa)                                   [...] +</text><text class="breeze-static-checks-r5" x="0" y="996" textLength="12.2" clip-path="url(#breeze-static-checks-line-40)">│</text><text class="breeze-static-checks-r4" x="24.4" y="996" textLength="12.2" clip-path="url(#breeze-static-checks-line-40)">-</text><text class="breeze-static-checks-r4" x="36.6" y="996" textLength="61" clip-path="url(#breeze-static-checks-line-40)">-file</text><text class="breeze-static-checks-r6" x="317.2" y="996" textLength="24.4" clip-path="url(#breeze-stati [...] +</text><text class="breeze-static-checks-r5" x="0" y="1020.4" textLength="12.2" clip-path="url(#breeze-static-checks-line-41)">│</text><text class="breeze-static-checks-r4" x="24.4" y="1020.4" textLength="12.2" clip-path="url(#breeze-static-checks-line-41)">-</text><text class="breeze-static-checks-r4" x="36.6" y="1020.4" textLength="48.8" clip-path="url(#breeze-static-checks-line-41)">-all</text><text class="breeze-static-checks-r4" x="85.4" y="1020.4" textLength="73.2" clip-path="url(# [...] +</text><text class="breeze-static-checks-r5" x="0" y="1044.8" textLength="12.2" clip-path="url(#breeze-static-checks-line-42)">│</text><text class="breeze-static-checks-r4" x="24.4" y="1044.8" textLength="12.2" clip-path="url(#breeze-static-checks-line-42)">-</text><text class="breeze-static-checks-r4" x="36.6" y="1044.8" textLength="61" clip-path="url(#breeze-static-checks-line-42)">-show</text><text class="breeze-static-checks-r4" x="97.6" y="1044.8" textLength="195.2" clip-path="url(# [...] +</text><text class="breeze-static-checks-r5" x="0" y="1069.2" textLength="12.2" clip-path="url(#breeze-static-checks-line-43)">│</text><text class="breeze-static-checks-r4" x="24.4" y="1069.2" textLength="12.2" clip-path="url(#breeze-static-checks-line-43)">-</text><text class="breeze-static-checks-r4" x="36.6" y="1069.2" textLength="61" clip-path="url(#breeze-static-checks-line-43)">-last</text><text class="breeze-static-checks-r4" x="97.6" y="1069.2" textLength="85.4" clip-path="url(#b [...] +</text><text class="breeze-static-checks-r5" x="0" y="1093.6" textLength="12.2" clip-path="url(#breeze-static-checks-line-44)">│</text><text class="breeze-static-checks-r4" x="24.4" y="1093.6" textLength="12.2" clip-path="url(#breeze-static-checks-line-44)">-</text><text class="breeze-static-checks-r4" x="36.6" y="1093.6" textLength="85.4" clip-path="url(#breeze-static-checks-line-44)">-commit</text><text class="breeze-static-checks-r4" x="122" y="1093.6" textLength="48.8" clip-path="url [...] +</text><text class="breeze-static-checks-r5" x="0" y="1118" textLength="12.2" clip-path="url(#breeze-static-checks-line-45)">│</text><text class="breeze-static-checks-r2" x="366" y="1118" textLength="292.8" clip-path="url(#breeze-static-checks-line-45)">Mutually exclusive with </text><text class="breeze-static-checks-r4" x="658.8" y="1118" textLength="12.2" clip-path="url(#breeze-static-checks-line-45)">-</text><text class="breeze-static-checks-r4" x="671" y="1118" textLen [...] +</text><text class="breeze-static-checks-r5" x="0" y="1142.4" textLength="12.2" clip-path="url(#breeze-static-checks-line-46)">│</text><text class="breeze-static-checks-r7" x="366" y="1142.4" textLength="1073.6" clip-path="url(#breeze-static-checks-line-46)">(TEXT)                                       [...] +</text><text class="breeze-static-checks-r5" x="0" y="1166.8" textLength="12.2" clip-path="url(#breeze-static-checks-line-47)">│</text><text class="breeze-static-checks-r4" x="24.4" y="1166.8" textLength="12.2" clip-path="url(#breeze-static-checks-line-47)">-</text><text class="breeze-static-checks-r4" x="36.6" y="1166.8" textLength="85.4" clip-path="url(#breeze-static-checks-line-47)">-github</text><text class="breeze-static-checks-r4" x="122" y="1166.8" textLength="134.2" clip-path="ur [...] +</text><text class="breeze-static-checks-r5" x="0" y="1191.2" textLength="1464" clip-path="url(#breeze-static-checks-line-48)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text class="breeze-static-checks-r2" x="1464" y="1191.2" textLength="12.2" clip-path="url(#breeze-static-checks-line-48)"> +</text><text class="breeze-static-checks-r5" x="0" y="1215.6" textLength="24.4" clip-path="url(#breeze-static-checks-line-49)">╭─</text><text class="breeze-static-checks-r5" x="24.4" y="1215.6" textLength="195.2" clip-path="url(#breeze-static-checks-line-49)"> Common options </text><text class="breeze-static-checks-r5" x="219.6" y="1215.6" textLength="1220" clip-path="url(#breeze-static-checks-line-49)">────────────────────────────────────────────────────────────────────── [...] +</text><text class="breeze-static-checks-r5" x="0" y="1240" textLength="12.2" clip-path="url(#breeze-static-checks-line-50)">│</text><text class="breeze-static-checks-r4" x="24.4" y="1240" textLength="12.2" clip-path="url(#breeze-static-checks-line-50)">-</text><text class="breeze-static-checks-r4" x="36.6" y="1240" textLength="97.6" clip-path="url(#breeze-static-checks-line-50)">-verbose</text><text class="breeze-static-checks-r6" x="158.6" y="1240" textLength="24.4" clip-path="url(#bre [...] +</text><text class="breeze-static-checks-r5" x="0" y="1264.4" textLength="12.2" clip-path="url(#breeze-static-checks-line-51)">│</text><text class="breeze-static-checks-r4" x="24.4" y="1264.4" textLength="12.2" clip-path="url(#breeze-static-checks-line-51)">-</text><text class="breeze-static-checks-r4" x="36.6" y="1264.4" textLength="48.8" clip-path="url(#breeze-static-checks-line-51)">-dry</text><text class="breeze-static-checks-r4" x="85.4" y="1264.4" textLength="48.8" clip-path="url(# [...] +</text><text class="breeze-static-checks-r5" x="0" y="1288.8" textLength="12.2" clip-path="url(#breeze-static-checks-line-52)">│</text><text class="breeze-static-checks-r4" x="24.4" y="1288.8" textLength="12.2" clip-path="url(#breeze-static-checks-line-52)">-</text><text class="breeze-static-checks-r4" x="36.6" y="1288.8" textLength="61" clip-path="url(#breeze-static-checks-line-52)">-help</text><text class="breeze-static-checks-r6" x="158.6" y="1288.8" textLength="24.4" clip-path="url(# [...] +</text><text class="breeze-static-checks-r5" x="0" y="1313.2" textLength="1464" clip-path="url(#breeze-static-checks-line-53)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text class="breeze-static-checks-r2" x="1464" y="1313.2" textLength="12.2" clip-path="url(#breeze-static-checks-line-53)"> </text> </g> </g> diff --git a/images/breeze/output_stop.svg b/images/breeze/output_stop.svg index 81e2abb315..3197abd935 100644 --- a/images/breeze/output_stop.svg +++ b/images/breeze/output_stop.svg @@ -35,8 +35,8 @@ .breeze-stop-r1 { fill: #c5c8c6;font-weight: bold } .breeze-stop-r2 { fill: #c5c8c6 } .breeze-stop-r3 { fill: #d0b344;font-weight: bold } -.breeze-stop-r4 { fill: #868887 } -.breeze-stop-r5 { fill: #68a0b3;font-weight: bold } +.breeze-stop-r4 { fill: #68a0b3;font-weight: bold } +.breeze-stop-r5 { fill: #868887 } .breeze-stop-r6 { fill: #98a84b;font-weight: bold } </style> @@ -96,19 +96,19 @@ <g class="breeze-stop-matrix"> <text class="breeze-stop-r2" x="1464" y="20" textLength="12.2" clip-path="url(#breeze-stop-line-0)"> -</text><text class="breeze-stop-r3" x="12.2" y="44.4" textLength="85.4" clip-path="url(#breeze-stop-line-1)">Usage: </text><text class="breeze-stop-r1" x="97.6" y="44.4" textLength="256.2" clip-path="url(#breeze-stop-line-1)">breeze stop [OPTIONS]</text><text class="breeze-stop-r2" x="1464" y="44.4" textLength="12.2" clip-path="url(#breeze-stop-line-1)"> +</text><text class="breeze-stop-r3" x="12.2" y="44.4" textLength="85.4" clip-path="url(#breeze-stop-line-1)">Usage: </text><text class="breeze-stop-r1" x="97.6" y="44.4" textLength="158.6" clip-path="url(#breeze-stop-line-1)">breeze stop [</text><text class="breeze-stop-r4" x="256.2" y="44.4" textLength="85.4" clip-path="url(#breeze-stop-line-1)">OPTIONS</text><text class="breeze-stop-r1" x="341.6" y="44.4" textLength="12.2" clip-path="url(#breeze-stop-line-1)">]</text><te [...] </text><text class="breeze-stop-r2" x="1464" y="68.8" textLength="12.2" clip-path="url(#breeze-stop-line-2)"> </text><text class="breeze-stop-r2" x="12.2" y="93.2" textLength="390.4" clip-path="url(#breeze-stop-line-3)">Stop running breeze environment.</text><text class="breeze-stop-r2" x="1464" y="93.2" textLength="12.2" clip-path="url(#breeze-stop-line-3)"> </text><text class="breeze-stop-r2" x="1464" y="117.6" textLength="12.2" clip-path="url(#breeze-stop-line-4)"> -</text><text class="breeze-stop-r4" x="0" y="142" textLength="24.4" clip-path="url(#breeze-stop-line-5)">╭─</text><text class="breeze-stop-r4" x="24.4" y="142" textLength="146.4" clip-path="url(#breeze-stop-line-5)"> Stop flags </text><text class="breeze-stop-r4" x="170.8" y="142" textLength="1268.8" clip-path="url(#breeze-stop-line-5)">────────────────────────────────────────────────────────────────────────────────────────────────────────</text><text class="breeze-stop-r4 [...] -</text><text class="breeze-stop-r4" x="0" y="166.4" textLength="12.2" clip-path="url(#breeze-stop-line-6)">│</text><text class="breeze-stop-r5" x="24.4" y="166.4" textLength="12.2" clip-path="url(#breeze-stop-line-6)">-</text><text class="breeze-stop-r5" x="36.6" y="166.4" textLength="109.8" clip-path="url(#breeze-stop-line-6)">-preserve</text><text class="breeze-stop-r5" x="146.4" y="166.4" textLength="97.6" clip-path="url(#breeze-stop-line-6)">-volumes</text><text class="breeze-stop-r6 [...] -</text><text class="breeze-stop-r4" x="0" y="190.8" textLength="12.2" clip-path="url(#breeze-stop-line-7)">│</text><text class="breeze-stop-r5" x="24.4" y="190.8" textLength="12.2" clip-path="url(#breeze-stop-line-7)">-</text><text class="breeze-stop-r5" x="36.6" y="190.8" textLength="97.6" clip-path="url(#breeze-stop-line-7)">-cleanup</text><text class="breeze-stop-r5" x="134.2" y="190.8" textLength="134.2" clip-path="url(#breeze-stop-line-7)">-mypy-cache</text><text class="breeze-stop- [...] -</text><text class="breeze-stop-r4" x="0" y="215.2" textLength="1464" clip-path="url(#breeze-stop-line-8)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text class="breeze-stop-r2" x="1464" y="215.2" textLength="12.2" clip-path="url(#breeze-stop-line-8)"> -</text><text class="breeze-stop-r4" x="0" y="239.6" textLength="24.4" clip-path="url(#breeze-stop-line-9)">╭─</text><text class="breeze-stop-r4" x="24.4" y="239.6" textLength="195.2" clip-path="url(#breeze-stop-line-9)"> Common options </text><text class="breeze-stop-r4" x="219.6" y="239.6" textLength="1220" clip-path="url(#breeze-stop-line-9)">────────────────────────────────────────────────────────────────────────────────────────────────────</text><text class="breeze-sto [...] -</text><text class="breeze-stop-r4" x="0" y="264" textLength="12.2" clip-path="url(#breeze-stop-line-10)">│</text><text class="breeze-stop-r5" x="24.4" y="264" textLength="12.2" clip-path="url(#breeze-stop-line-10)">-</text><text class="breeze-stop-r5" x="36.6" y="264" textLength="97.6" clip-path="url(#breeze-stop-line-10)">-verbose</text><text class="breeze-stop-r6" x="158.6" y="264" textLength="24.4" clip-path="url(#breeze-stop-line-10)">-v</text><text class="breeze-stop-r2" x="207.4" [...] -</text><text class="breeze-stop-r4" x="0" y="288.4" textLength="12.2" clip-path="url(#breeze-stop-line-11)">│</text><text class="breeze-stop-r5" x="24.4" y="288.4" textLength="12.2" clip-path="url(#breeze-stop-line-11)">-</text><text class="breeze-stop-r5" x="36.6" y="288.4" textLength="48.8" clip-path="url(#breeze-stop-line-11)">-dry</text><text class="breeze-stop-r5" x="85.4" y="288.4" textLength="48.8" clip-path="url(#breeze-stop-line-11)">-run</text><text class="breeze-stop-r6" x="15 [...] -</text><text class="breeze-stop-r4" x="0" y="312.8" textLength="12.2" clip-path="url(#breeze-stop-line-12)">│</text><text class="breeze-stop-r5" x="24.4" y="312.8" textLength="12.2" clip-path="url(#breeze-stop-line-12)">-</text><text class="breeze-stop-r5" x="36.6" y="312.8" textLength="61" clip-path="url(#breeze-stop-line-12)">-help</text><text class="breeze-stop-r6" x="158.6" y="312.8" textLength="24.4" clip-path="url(#breeze-stop-line-12)">-h</text><text class="breeze-stop-r2" x="207. [...] -</text><text class="breeze-stop-r4" x="0" y="337.2" textLength="1464" clip-path="url(#breeze-stop-line-13)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text class="breeze-stop-r2" x="1464" y="337.2" textLength="12.2" clip-path="url(#breeze-stop-line-13)"> +</text><text class="breeze-stop-r5" x="0" y="142" textLength="24.4" clip-path="url(#breeze-stop-line-5)">╭─</text><text class="breeze-stop-r5" x="24.4" y="142" textLength="146.4" clip-path="url(#breeze-stop-line-5)"> Stop flags </text><text class="breeze-stop-r5" x="170.8" y="142" textLength="1268.8" clip-path="url(#breeze-stop-line-5)">────────────────────────────────────────────────────────────────────────────────────────────────────────</text><text class="breeze-stop-r5 [...] +</text><text class="breeze-stop-r5" x="0" y="166.4" textLength="12.2" clip-path="url(#breeze-stop-line-6)">│</text><text class="breeze-stop-r4" x="24.4" y="166.4" textLength="12.2" clip-path="url(#breeze-stop-line-6)">-</text><text class="breeze-stop-r4" x="36.6" y="166.4" textLength="109.8" clip-path="url(#breeze-stop-line-6)">-preserve</text><text class="breeze-stop-r4" x="146.4" y="166.4" textLength="97.6" clip-path="url(#breeze-stop-line-6)">-volumes</text><text class="breeze-stop-r6 [...] +</text><text class="breeze-stop-r5" x="0" y="190.8" textLength="12.2" clip-path="url(#breeze-stop-line-7)">│</text><text class="breeze-stop-r4" x="24.4" y="190.8" textLength="12.2" clip-path="url(#breeze-stop-line-7)">-</text><text class="breeze-stop-r4" x="36.6" y="190.8" textLength="97.6" clip-path="url(#breeze-stop-line-7)">-cleanup</text><text class="breeze-stop-r4" x="134.2" y="190.8" textLength="134.2" clip-path="url(#breeze-stop-line-7)">-mypy-cache</text><text class="breeze-stop- [...] +</text><text class="breeze-stop-r5" x="0" y="215.2" textLength="1464" clip-path="url(#breeze-stop-line-8)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text class="breeze-stop-r2" x="1464" y="215.2" textLength="12.2" clip-path="url(#breeze-stop-line-8)"> +</text><text class="breeze-stop-r5" x="0" y="239.6" textLength="24.4" clip-path="url(#breeze-stop-line-9)">╭─</text><text class="breeze-stop-r5" x="24.4" y="239.6" textLength="195.2" clip-path="url(#breeze-stop-line-9)"> Common options </text><text class="breeze-stop-r5" x="219.6" y="239.6" textLength="1220" clip-path="url(#breeze-stop-line-9)">────────────────────────────────────────────────────────────────────────────────────────────────────</text><text class="breeze-sto [...] +</text><text class="breeze-stop-r5" x="0" y="264" textLength="12.2" clip-path="url(#breeze-stop-line-10)">│</text><text class="breeze-stop-r4" x="24.4" y="264" textLength="12.2" clip-path="url(#breeze-stop-line-10)">-</text><text class="breeze-stop-r4" x="36.6" y="264" textLength="97.6" clip-path="url(#breeze-stop-line-10)">-verbose</text><text class="breeze-stop-r6" x="158.6" y="264" textLength="24.4" clip-path="url(#breeze-stop-line-10)">-v</text><text class="breeze-stop-r2" x="207.4" [...] +</text><text class="breeze-stop-r5" x="0" y="288.4" textLength="12.2" clip-path="url(#breeze-stop-line-11)">│</text><text class="breeze-stop-r4" x="24.4" y="288.4" textLength="12.2" clip-path="url(#breeze-stop-line-11)">-</text><text class="breeze-stop-r4" x="36.6" y="288.4" textLength="48.8" clip-path="url(#breeze-stop-line-11)">-dry</text><text class="breeze-stop-r4" x="85.4" y="288.4" textLength="48.8" clip-path="url(#breeze-stop-line-11)">-run</text><text class="breeze-stop-r6" x="15 [...] +</text><text class="breeze-stop-r5" x="0" y="312.8" textLength="12.2" clip-path="url(#breeze-stop-line-12)">│</text><text class="breeze-stop-r4" x="24.4" y="312.8" textLength="12.2" clip-path="url(#breeze-stop-line-12)">-</text><text class="breeze-stop-r4" x="36.6" y="312.8" textLength="61" clip-path="url(#breeze-stop-line-12)">-help</text><text class="breeze-stop-r6" x="158.6" y="312.8" textLength="24.4" clip-path="url(#breeze-stop-line-12)">-h</text><text class="breeze-stop-r2" x="207. [...] +</text><text class="breeze-stop-r5" x="0" y="337.2" textLength="1464" clip-path="url(#breeze-stop-line-13)">╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</text><text class="breeze-stop-r2" x="1464" y="337.2" textLength="12.2" clip-path="url(#breeze-stop-line-13)"> </text> </g> </g> diff --git a/scripts/ci/pre_commit/pre_commit_update_black_version.py b/scripts/ci/pre_commit/pre_commit_update_black_version.py new file mode 100755 index 0000000000..5e4fda5ed3 --- /dev/null +++ b/scripts/ci/pre_commit/pre_commit_update_black_version.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +from __future__ import annotations + +import re +from pathlib import Path + +import yaml + +AIRFLOW_SOURCES = Path(__file__).parents[3].resolve() + + +if __name__ == "__main__": + PRE_COMMIT_CONFIG_FILE = AIRFLOW_SOURCES / ".pre-commit-config.yaml" + pre_commit_content = yaml.safe_load(PRE_COMMIT_CONFIG_FILE.read_text()) + for repo in pre_commit_content["repos"]: + if repo["repo"] == "https://github.com/psf/black": + black_version = repo["rev"] + pre_commit_text = PRE_COMMIT_CONFIG_FILE.read_text() + pre_commit_text = re.sub(r"black==[0-9\.]*", f"black=={black_version}", pre_commit_text) + PRE_COMMIT_CONFIG_FILE.write_text(pre_commit_text) + break
