From bad37971cb4bae99042397eaa39be6a11427fe61 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 20:38:17 +0400 Subject: [PATCH] [Backport 8.x] Switch to black's 2025 code style (#756) * Switch to black's 2025 code style (#749) (cherry picked from commit aa5196edeef9f772dd10dd7d382956a945f0d3de) * Run nox -rs format --------- Co-authored-by: Quentin Pradet --- eland/common.py | 2 +- noxfile.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eland/common.py b/eland/common.py index 667313c..e23afe3 100644 --- a/eland/common.py +++ b/eland/common.py @@ -309,7 +309,7 @@ def elasticsearch_date_to_pandas_date( def ensure_es_client( - es_client: Union[str, List[str], Tuple[str, ...], Elasticsearch] + es_client: Union[str, List[str], Tuple[str, ...], Elasticsearch], ) -> Elasticsearch: if isinstance(es_client, tuple): es_client = list(es_client) diff --git a/noxfile.py b/noxfile.py index 492331e..a404d2a 100644 --- a/noxfile.py +++ b/noxfile.py @@ -58,7 +58,7 @@ TYPED_FILES = ( @nox.session(reuse_venv=True, python="3.11") def format(session): - session.install("black", "isort", "flynt") + session.install("black ~= 25.0", "isort", "flynt") session.run("python", "utils/license-headers.py", "fix", *SOURCE_FILES) session.run("flynt", *SOURCE_FILES) session.run("black", "--target-version=py39", *SOURCE_FILES) @@ -70,7 +70,7 @@ def format(session): def lint(session): # Install numpy to use its mypy plugin # https://numpy.org/devdocs/reference/typing.html#mypy-plugin - session.install("black", "flake8", "mypy", "isort", "numpy") + session.install("black ~= 25.0", "flake8", "mypy", "isort", "numpy") session.install(".") session.run("python", "utils/license-headers.py", "check", *SOURCE_FILES) session.run("black", "--check", "--target-version=py39", *SOURCE_FILES)