File tree 4 files changed +22
-14
lines changed
4 files changed +22
-14
lines changed Original file line number Diff line number Diff line change @@ -264,7 +264,10 @@ def updateByQuery(self, using=None):
264
264
For more information, see here:
265
265
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html
266
266
"""
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
+ )
268
271
269
272
def create (self , using = None , ** kwargs ):
270
273
"""
Original file line number Diff line number Diff line change 32
32
SKIP_VALUES = ("" , None )
33
33
EXPAND__TO_DOT = True
34
34
35
- DOC_META_FIELDS = frozenset (("id" , "routing" ,))
35
+ DOC_META_FIELDS = frozenset (
36
+ (
37
+ "id" ,
38
+ "routing" ,
39
+ )
40
+ )
36
41
37
42
META_FIELDS = frozenset (
38
43
(
Original file line number Diff line number Diff line change @@ -437,7 +437,10 @@ def test_delete(write_client):
437
437
test_repo .meta .index = "test-document"
438
438
test_repo .delete ()
439
439
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
+ )
441
444
442
445
443
446
def test_search (data_client ):
Original file line number Diff line number Diff line change @@ -429,17 +429,14 @@ def test_source():
429
429
430
430
431
431
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 ()
443
440
assert {
444
441
"_source" : False ,
445
442
"query" : {"bool" : {"filter" : [{"term" : {"title" : "python" }}]}},
You can’t perform that action at this time.
0 commit comments