File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed
test_elasticsearch/test_dsl/test_integration Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -126,10 +126,10 @@ def search(
126126 Create an :class:`~elasticsearch.dsl.Search` instance that will search
127127 over this ``Document``.
128128 """
129- s = AsyncSearch (
129+ s = AsyncSearch [ Self ] (
130130 using = cls ._get_using (using ), index = cls ._default_index (index ), doc_type = [cls ]
131131 )
132- return s .source (cls ._get_field_names ())
132+ return s .source (cls ._get_field_names ()) # type: ignore[arg-type]
133133
134134 @classmethod
135135 async def get (
Original file line number Diff line number Diff line change @@ -120,10 +120,10 @@ def search(
120120 Create an :class:`~elasticsearch.dsl.Search` instance that will search
121121 over this ``Document``.
122122 """
123- s = Search (
123+ s = Search [ Self ] (
124124 using = cls ._get_using (using ), index = cls ._default_index (index ), doc_type = [cls ]
125125 )
126- return s .source (cls ._get_field_names ())
126+ return s .source (cls ._get_field_names ()) # type: ignore[arg-type]
127127
128128 @classmethod
129129 def get (
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ async def test_inner_hits_are_serialized_to_dict(
135135
136136@pytest .mark .anyio
137137async def test_scan_respects_doc_types (async_data_client : AsyncElasticsearch ) -> None :
138- repos = [repo async for repo in Repository .search ().scan ()]
138+ repos = [repo async for repo in Repository .search ().source ( "organization" ). scan ()]
139139
140140 assert 1 == len (repos )
141141 assert isinstance (repos [0 ], Repository )
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ def test_inner_hits_are_serialized_to_dict(
135135
136136@pytest .mark .sync
137137def test_scan_respects_doc_types (data_client : Elasticsearch ) -> None :
138- repos = [repo for repo in Repository .search ().scan ()]
138+ repos = [repo for repo in Repository .search ().source ( "organization" ). scan ()]
139139
140140 assert 1 == len (repos )
141141 assert isinstance (repos [0 ], Repository )
You can’t perform that action at this time.
0 commit comments