diff --git a/elasticsearch/dsl/search_base.py b/elasticsearch/dsl/search_base.py index ad4a56059..c513fc78d 100644 --- a/elasticsearch/dsl/search_base.py +++ b/elasticsearch/dsl/search_base.py @@ -698,12 +698,12 @@ def ensure_strings(fields: "InstrumentedField") -> str: ... @overload def ensure_strings( - fields: List[Union[str, "InstrumentedField"]] + fields: List[Union[str, "InstrumentedField"]], ) -> List[str]: ... @overload def ensure_strings( - fields: Dict[str, List[Union[str, "InstrumentedField"]]] + fields: Dict[str, List[Union[str, "InstrumentedField"]]], ) -> Dict[str, List[str]]: ... def ensure_strings( @@ -712,7 +712,7 @@ def ensure_strings( "InstrumentedField", List[Union[str, "InstrumentedField"]], Dict[str, List[Union[str, "InstrumentedField"]]], - ] + ], ) -> Union[str, List[str], Dict[str, List[str]]]: if isinstance(fields, dict): return {k: ensure_strings(v) for k, v in fields.items()} diff --git a/noxfile.py b/noxfile.py index 90172d49e..c9e961900 100644 --- a/noxfile.py +++ b/noxfile.py @@ -66,7 +66,9 @@ def test_otel(session): @nox.session() def format(session): - session.install(".", "black~=24.0", "isort", "flynt", "unasync>=0.6.0", "jinja2") + session.install( + ".", "black~=25.0", "isort~=6.0", "flynt", "unasync>=0.6.0", "jinja2" + ) session.run("python", "utils/run-unasync.py") session.run("python", "utils/run-unasync-dsl.py") @@ -88,9 +90,9 @@ def lint(session): session.install( "flake8", - "black~=24.0", + "black~=25.0", "mypy", - "isort", + "isort~=6.0", "types-requests", "types-python-dateutil", "unasync>=0.6.0", diff --git a/test_elasticsearch/test_dsl/test_result.py b/test_elasticsearch/test_dsl/test_result.py index 46707c715..2acd810d5 100644 --- a/test_elasticsearch/test_dsl/test_result.py +++ b/test_elasticsearch/test_dsl/test_result.py @@ -130,7 +130,7 @@ def test_iterating_over_response_gives_you_hits(dummy_response: Dict[str, Any]) def test_hits_get_wrapped_to_contain_additional_attrs( - dummy_response: Dict[str, Any] + dummy_response: Dict[str, Any], ) -> None: res = response.Response(Search(), dummy_response) hits = res.hits @@ -140,7 +140,7 @@ def test_hits_get_wrapped_to_contain_additional_attrs( def test_hits_provide_dot_and_bracket_access_to_attrs( - dummy_response: Dict[str, Any] + dummy_response: Dict[str, Any], ) -> None: res = response.Response(Search(), dummy_response) h = res.hits[0]