Skip to content

Commit 68f8012

Browse files
authored
Switch to Black 2025 and isort 6 (#2779)
* Switch to Black 2025 code style * Run format with isort 6
1 parent b875a0b commit 68f8012

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

elasticsearch/dsl/search_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -698,12 +698,12 @@ def ensure_strings(fields: "InstrumentedField") -> str: ...
698698

699699
@overload
700700
def ensure_strings(
701-
fields: List[Union[str, "InstrumentedField"]]
701+
fields: List[Union[str, "InstrumentedField"]],
702702
) -> List[str]: ...
703703

704704
@overload
705705
def ensure_strings(
706-
fields: Dict[str, List[Union[str, "InstrumentedField"]]]
706+
fields: Dict[str, List[Union[str, "InstrumentedField"]]],
707707
) -> Dict[str, List[str]]: ...
708708

709709
def ensure_strings(
@@ -712,7 +712,7 @@ def ensure_strings(
712712
"InstrumentedField",
713713
List[Union[str, "InstrumentedField"]],
714714
Dict[str, List[Union[str, "InstrumentedField"]]],
715-
]
715+
],
716716
) -> Union[str, List[str], Dict[str, List[str]]]:
717717
if isinstance(fields, dict):
718718
return {k: ensure_strings(v) for k, v in fields.items()}

noxfile.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ def test_otel(session):
6666

6767
@nox.session()
6868
def format(session):
69-
session.install(".", "black~=24.0", "isort", "flynt", "unasync>=0.6.0", "jinja2")
69+
session.install(
70+
".", "black~=25.0", "isort~=6.0", "flynt", "unasync>=0.6.0", "jinja2"
71+
)
7072

7173
session.run("python", "utils/run-unasync.py")
7274
session.run("python", "utils/run-unasync-dsl.py")
@@ -88,9 +90,9 @@ def lint(session):
8890

8991
session.install(
9092
"flake8",
91-
"black~=24.0",
93+
"black~=25.0",
9294
"mypy",
93-
"isort",
95+
"isort~=6.0",
9496
"types-requests",
9597
"types-python-dateutil",
9698
"unasync>=0.6.0",

test_elasticsearch/test_dsl/test_result.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def test_iterating_over_response_gives_you_hits(dummy_response: Dict[str, Any])
130130

131131

132132
def test_hits_get_wrapped_to_contain_additional_attrs(
133-
dummy_response: Dict[str, Any]
133+
dummy_response: Dict[str, Any],
134134
) -> None:
135135
res = response.Response(Search(), dummy_response)
136136
hits = res.hits
@@ -140,7 +140,7 @@ def test_hits_get_wrapped_to_contain_additional_attrs(
140140

141141

142142
def test_hits_provide_dot_and_bracket_access_to_attrs(
143-
dummy_response: Dict[str, Any]
143+
dummy_response: Dict[str, Any],
144144
) -> None:
145145
res = response.Response(Search(), dummy_response)
146146
h = res.hits[0]

0 commit comments

Comments
 (0)