Skip to content

Commit 1b61d14

Browse files
committed
Codestyle fixes
1 parent 7fafc82 commit 1b61d14

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

tests/test_search.py

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2507,9 +2507,7 @@ def test_search_missing_fields(client):
25072507
)
25082508

25092509
with pytest.raises(redis.exceptions.ResponseError) as e:
2510-
client.ft().search(
2511-
Query("ismissing(@title)").return_field("id").no_content()
2512-
)
2510+
client.ft().search(Query("ismissing(@title)").return_field("id").no_content())
25132511
assert "to be defined with 'INDEXMISSING'" in e.value.args[0]
25142512

25152513
res = client.ft().search(
@@ -2578,9 +2576,7 @@ def test_search_empty_fields(client):
25782576
)
25792577

25802578
with pytest.raises(redis.exceptions.ResponseError) as e:
2581-
client.ft().search(
2582-
Query("@title:''").return_field("id").no_content()
2583-
)
2579+
client.ft().search(Query("@title:''").return_field("id").no_content())
25842580
assert "Use `INDEXEMPTY` in field creation" in e.value.args[0]
25852581

25862582
res = client.ft().search(
@@ -2595,14 +2591,10 @@ def test_search_empty_fields(client):
25952591
)
25962592
_assert_search_result(client, res, ["property:1", "property:3"])
25972593

2598-
res = client.ft().search(
2599-
Query("@description:''").return_field("id").no_content()
2600-
)
2594+
res = client.ft().search(Query("@description:''").return_field("id").no_content())
26012595
_assert_search_result(client, res, ["property:3"])
26022596

2603-
res = client.ft().search(
2604-
Query("-@description:''").return_field("id").no_content()
2605-
)
2597+
res = client.ft().search(Query("-@description:''").return_field("id").no_content())
26062598
_assert_search_result(client, res, ["property:1", "property:2"])
26072599

26082600

@@ -2649,9 +2641,7 @@ def test_special_characters_in_fields(client):
26492641
_assert_search_result(client, res, ["resource:1"])
26502642

26512643
# with double quotes exact match no need to escape the - even without params
2652-
res = client.ft().search(
2653-
Query('@uuid:{"123e4567-e89b-12d3-a456-426614174000"}')
2654-
)
2644+
res = client.ft().search(Query('@uuid:{"123e4567-e89b-12d3-a456-426614174000"}'))
26552645
_assert_search_result(client, res, ["resource:1"])
26562646

26572647
res = client.ft().search(Query('@tags:{"new-year\'s-resolutions"}'))
@@ -2690,15 +2680,13 @@ def test_vector_search_with_default_dialect(client):
26902680
res = client.ft().search(q, query_params={"vec": "aaaaaaaa"})
26912681
assert res.total == 2
26922682

2683+
26932684
@pytest.mark.redismod
26942685
@skip_ifmodversion_lt("2.4.3", "search")
26952686
def test_search_query_with_different_dialects(client):
26962687
client.ft().create_index(
2697-
(
2698-
TextField("name"),
2699-
TextField("lastname")
2700-
),
2701-
definition=IndexDefinition(prefix=["test:"])
2688+
(TextField("name"), TextField("lastname")),
2689+
definition=IndexDefinition(prefix=["test:"]),
27022690
)
27032691

27042692
client.hset("test:1", "name", "James")

0 commit comments

Comments
 (0)