Skip to content

Commit

Permalink
Switch to 2024 black style (#1701)
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin committed Feb 8, 2024
1 parent 40e1632 commit b02fe7f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions elasticsearch_dsl/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit b02fe7f

Please sign in to comment.