mirror of
https://github.com/elastic/eland.git
synced 2025-07-11 00:02:14 +08:00
[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 <quentin.pradet@elastic.co>
This commit is contained in:
parent
9b5badb941
commit
bad37971cb
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user