Skip to content

Commit 1b09073

Browse files
committed
[7.x] Apply new Black formatting
1 parent 1c2b950 commit 1b09073

File tree

4 files changed

+22
-14
lines changed

4 files changed

+22
-14
lines changed

elasticsearch_dsl/index.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,10 @@ def updateByQuery(self, using=None):
264264
For more information, see here:
265265
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html
266266
"""
267-
return UpdateByQuery(using=using or self._using, index=self._name,)
267+
return UpdateByQuery(
268+
using=using or self._using,
269+
index=self._name,
270+
)
268271

269272
def create(self, using=None, **kwargs):
270273
"""

elasticsearch_dsl/utils.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@
3232
SKIP_VALUES = ("", None)
3333
EXPAND__TO_DOT = True
3434

35-
DOC_META_FIELDS = frozenset(("id", "routing",))
35+
DOC_META_FIELDS = frozenset(
36+
(
37+
"id",
38+
"routing",
39+
)
40+
)
3641

3742
META_FIELDS = frozenset(
3843
(

test_elasticsearch_dsl/test_integration/test_document.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,10 @@ def test_delete(write_client):
437437
test_repo.meta.index = "test-document"
438438
test_repo.delete()
439439

440-
assert not write_client.exists(index="test-document", id="elasticsearch-dsl-py",)
440+
assert not write_client.exists(
441+
index="test-document",
442+
id="elasticsearch-dsl-py",
443+
)
441444

442445

443446
def test_search(data_client):

test_elasticsearch_dsl/test_search.py

+8-11
Original file line numberDiff line numberDiff line change
@@ -429,17 +429,14 @@ def test_source():
429429

430430

431431
def test_source_on_clone():
432-
assert (
433-
{
434-
"_source": {"includes": ["foo.bar.*"], "excludes": ["foo.one"]},
435-
"query": {"bool": {"filter": [{"term": {"title": "python"}}]}},
436-
}
437-
== search.Search()
438-
.source(includes=["foo.bar.*"])
439-
.source(excludes=["foo.one"])
440-
.filter("term", title="python")
441-
.to_dict()
442-
)
432+
assert {
433+
"_source": {"includes": ["foo.bar.*"], "excludes": ["foo.one"]},
434+
"query": {"bool": {"filter": [{"term": {"title": "python"}}]}},
435+
} == search.Search().source(includes=["foo.bar.*"]).source(
436+
excludes=["foo.one"]
437+
).filter(
438+
"term", title="python"
439+
).to_dict()
443440
assert {
444441
"_source": False,
445442
"query": {"bool": {"filter": [{"term": {"title": "python"}}]}},

0 commit comments

Comments
 (0)