From 495535b81e0ac9fbbc25d39aa3b1ad1303417c42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Bregu=C5=82a?= Date: Wed, 18 Aug 2021 01:56:38 +0200 Subject: [PATCH] Update pre-commit checks-flynt to 0.66 (#17672) Additionally, we now download flynt configurations from the official repository, which allows us to automatically download updates using the pre-commit autoupdate command --- .pre-commit-config.yaml | 15 +++++++-------- dev/airflow-license | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 992ea5f8664b4..e71573f83d1dd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -250,6 +250,13 @@ repos: exclude: | (?x) ^airflow/_vendor/ + - repo: https://github.com/ikamensh/flynt/ + rev: '0.66' + hooks: + - id: flynt + exclude: | + (?x) + ^airflow/_vendor/ - repo: local hooks: - id: lint-openapi @@ -622,14 +629,6 @@ repos: files: airflow/config_templates/config\.yml$ require_serial: true additional_dependencies: ['jsonschema==3.2.0', 'PyYAML==5.3.1', 'requests==2.25.0'] - - id: flynt - name: Convert to f-strings with flynt - entry: flynt - language: python - language_version: python3 - additional_dependencies: ['flynt==0.63'] - files: \.py$ - exclude: ^airflow/_vendor/ - id: ui-lint name: ESLint against airflow/ui language: node diff --git a/dev/airflow-license b/dev/airflow-license index 80ddfbfed5ab6..aa72d0ba058a7 100755 --- a/dev/airflow-license +++ b/dev/airflow-license @@ -68,7 +68,7 @@ def parse_license_file(project_name): if __name__ == "__main__": - print("{:<30}|{:<50}||{:<20}||{:<10}".format("PROJECT", "URL", "LICENSE TYPE DEFINED", "DETECTED")) + print(f"{'PROJECT':<30}|{'URL':<50}||{'LICENSE TYPE DEFINED':<20}||{'DETECTED':<10}") notices = get_notices()