Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 8.x] Switch to 2024 black style #1704

Merged
merged 2 commits into from
Feb 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Switch to 2024 black style (#1701)
(cherry picked from commit b02fe7f)
pquentin authored and github-actions[bot] committed Feb 8, 2024
commit 97460a45ec71f5662ecefeb601737dfbea011f4d
10 changes: 7 additions & 3 deletions elasticsearch_dsl/analysis.py
Original file line number Diff line number Diff line change
@@ -211,9 +211,13 @@ def get_definition(self):
if "filters" in d:
d["filters"] = [
# comma delimited string given by user
fs if isinstance(fs, str) else
# list of strings or TokenFilter objects
", ".join(f.to_dict() if hasattr(f, "to_dict") else f for f in fs)
(
fs
if isinstance(fs, str)
else
# list of strings or TokenFilter objects
", ".join(f.to_dict() if hasattr(f, "to_dict") else f for f in fs)
)
for fs in self.filters
]
return d
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -55,7 +55,7 @@ def test(session):

@nox.session(python="3.12")
def format(session):
session.install("black~=23.0", "isort")
session.install("black~=24.0", "isort")
session.run("black", "--target-version=py37", *SOURCE_FILES)
session.run("isort", *SOURCE_FILES)
session.run("python", "utils/license-headers.py", "fix", *SOURCE_FILES)
@@ -65,7 +65,7 @@ def format(session):

@nox.session(python="3.12")
def lint(session):
session.install("flake8", "black~=23.0", "isort")
session.install("flake8", "black~=24.0", "isort")
session.run("black", "--check", "--target-version=py37", *SOURCE_FILES)
session.run("isort", "--check", *SOURCE_FILES)
session.run("flake8", "--ignore=E501,E741,W503", *SOURCE_FILES)