This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 6b892bf21f Upgrade ruff to latest 0.0.282 version in pre-commits
(#33152)
6b892bf21f is described below
commit 6b892bf21f69a41caf670e2c498aea1c83086848
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sun Aug 6 15:46:30 2023 +0200
Upgrade ruff to latest 0.0.282 version in pre-commits (#33152)
---
.pre-commit-config.yaml | 2 +-
airflow/models/dag.py | 4 +---
airflow/providers/qubole/hooks/qubole.py | 6 +-----
dev/breeze/src/airflow_breeze/commands/release_candidate_command.py | 5 ++++-
scripts/ci/pre_commit/pre_commit_insert_extras.py | 4 ++--
scripts/ci/pre_commit/pre_commit_local_yml_mounts.py | 6 +++---
6 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index d289ef97c4..4ecfebb09c 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -188,7 +188,7 @@ repos:
# Since ruff makes use of multiple cores we _purposefully_ don't run
this in docker so it can use the
# host CPU to it's fullest
entry: ruff --fix --force-exclude
- additional_dependencies: ['ruff==0.0.272']
+ additional_dependencies: ['ruff==0.0.282']
files: \.pyi?$
exclude: ^.*/.*_vendor/|^tests/dags/test_imports.py
- repo: https://github.com/asottile/blacken-docs
diff --git a/airflow/models/dag.py b/airflow/models/dag.py
index ba4278a8da..10f4c595d7 100644
--- a/airflow/models/dag.py
+++ b/airflow/models/dag.py
@@ -2219,9 +2219,7 @@ class DAG(LoggingMixin):
return 0
if confirm_prompt:
ti_list = "\n".join(str(t) for t in tis)
- question = (
- "You are about to delete these {count}
tasks:\n{ti_list}\n\nAre you sure? [y/n]"
- ).format(count=count, ti_list=ti_list)
+ question = f"You are about to delete these {count}
tasks:\n{ti_list}\n\nAre you sure? [y/n]"
do_it = utils.helpers.ask_yesno(question)
if do_it:
diff --git a/airflow/providers/qubole/hooks/qubole.py
b/airflow/providers/qubole/hooks/qubole.py
index 250a56bdf6..8f8a733012 100644
--- a/airflow/providers/qubole/hooks/qubole.py
+++ b/airflow/providers/qubole/hooks/qubole.py
@@ -185,11 +185,7 @@ class QuboleHook(BaseHook):
)
if self.cmd.status != "done": # type: ignore[attr-defined]
- raise AirflowException(
- "Command Id: {} failed with Status: {}".format(
- self.cmd.id, self.cmd.status # type: ignore[attr-defined]
- )
- )
+ raise AirflowException(f"Command Id: {self.cmd.id} failed with
Status: {self.cmd.status}")
def kill(self, ti):
"""
diff --git
a/dev/breeze/src/airflow_breeze/commands/release_candidate_command.py
b/dev/breeze/src/airflow_breeze/commands/release_candidate_command.py
index b79c2fd8bb..71ae2e7039 100644
--- a/dev/breeze/src/airflow_breeze/commands/release_candidate_command.py
+++ b/dev/breeze/src/airflow_breeze/commands/release_candidate_command.py
@@ -203,7 +203,10 @@ def push_packages_to_test_pypi(version):
"environment. The package download link is available at: "
"https://test.pypi.org/project/apache-airflow/#files "
"Install it with the appropriate constraint file, adapt python
version: "
- f"pip install -i https://test.pypi.org/simple/ --extra-index-url
https://pypi.org/simple/apache-airflow=={version} --constraint
https://raw.githubusercontent.com/apache/airflow/constraints-{version}/constraints-3.8.txt"
# noqa: 501
+ f"pip install -i https://test.pypi.org/simple/ --extra-index-url "
+ f"https://pypi.org/simple/apache-airflow=={version} --constraint "
+ f"https://raw.githubusercontent.com/apache/airflow/"
+ f"constraints-{version}/constraints-3.8.txt"
)
diff --git a/scripts/ci/pre_commit/pre_commit_insert_extras.py
b/scripts/ci/pre_commit/pre_commit_insert_extras.py
index 2ec53c1962..81669d0493 100755
--- a/scripts/ci/pre_commit/pre_commit_insert_extras.py
+++ b/scripts/ci/pre_commit/pre_commit_insert_extras.py
@@ -30,8 +30,8 @@ sys.path.insert(0, str(AIRFLOW_SOURCES_DIR)) # make sure
setup is imported from
os.environ["_SKIP_PYTHON_VERSION_CHECK"] = "true"
-from common_precommit_utils import insert_documentation # isort: skip
-from setup import EXTRAS_DEPENDENCIES # isort:skip
+from common_precommit_utils import insert_documentation # isort: skip #
noqa: E402
+from setup import EXTRAS_DEPENDENCIES # isort:skip # noqa: E402
sys.path.append(str(AIRFLOW_SOURCES_DIR))
diff --git a/scripts/ci/pre_commit/pre_commit_local_yml_mounts.py
b/scripts/ci/pre_commit/pre_commit_local_yml_mounts.py
index e39fe50e0e..902a4dde1c 100755
--- a/scripts/ci/pre_commit/pre_commit_local_yml_mounts.py
+++ b/scripts/ci/pre_commit/pre_commit_local_yml_mounts.py
@@ -22,16 +22,16 @@ from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent.resolve())) # make sure
common_precommit_utils is imported
-from common_precommit_utils import AIRFLOW_SOURCES_ROOT_PATH # isort: skip
+from common_precommit_utils import AIRFLOW_SOURCES_ROOT_PATH # isort: skip #
noqa: E402
sys.path.insert(0, str(AIRFLOW_SOURCES_ROOT_PATH)) # make sure setup is
imported from Airflow
sys.path.insert(
0, str(AIRFLOW_SOURCES_ROOT_PATH / "dev" / "breeze" / "src")
) # make sure setup is imported from Airflow
# flake8: noqa: F401
-from airflow_breeze.utils.docker_command_utils import
VOLUMES_FOR_SELECTED_MOUNTS # isort: skip
+from airflow_breeze.utils.docker_command_utils import
VOLUMES_FOR_SELECTED_MOUNTS # isort: skip # noqa: E402
-from common_precommit_utils import insert_documentation # isort: skip
+from common_precommit_utils import insert_documentation # isort: skip # noqa:
E402
sys.path.append(str(AIRFLOW_SOURCES_ROOT_PATH))