Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 00b6cbb

Browse files
authored
Fixed type in docstring for get_query_result (#425)
Updated parameter `selector` from str to dict in docstring
1 parent e4a0224 commit 00b6cbb

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Unreleased
22

33
- [IMPROVED] Updated `Getting started` section with a `get_query_result` example.
4+
- [FIXED] Fixed parameter type of `selector` in docstring.
45

56
# 2.11.0 (2019-01-21)
67

src/cloudant/database.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python
2-
# Copyright (C) 2015, 2018 IBM Corp. All rights reserved.
2+
# Copyright (C) 2015, 2019 IBM Corp. All rights reserved.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -1112,7 +1112,7 @@ def get_query_result(self, selector, fields=None, raw_result=False,
11121112
For more detail on slicing and iteration, refer to the
11131113
:class:`~cloudant.result.QueryResult` documentation.
11141114
1115-
:param str selector: Dictionary object describing criteria used to
1115+
:param dict selector: Dictionary object describing criteria used to
11161116
select documents.
11171117
:param list fields: A list of fields to be returned by the query.
11181118
:param bool raw_result: Dictates whether the query result is returned

src/cloudant/query.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python
2-
# Copyright (C) 2015, 2018 IBM. All rights reserved.
2+
# Copyright (C) 2015, 2019 IBM. All rights reserved.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -75,7 +75,7 @@ class Query(dict):
7575
:param int limit: Maximum number of results returned.
7676
:param int r: Read quorum needed for the result. Each document is read from
7777
at least 'r' number of replicas before it is returned in the results.
78-
:param str selector: Dictionary object describing criteria used to select
78+
:param dict selector: Dictionary object describing criteria used to select
7979
documents.
8080
:param int skip: Skip the first 'n' results, where 'n' is the value
8181
specified.
@@ -137,7 +137,7 @@ def __call__(self, **kwargs):
137137
:param int r: Read quorum needed for the result. Each document is read
138138
from at least 'r' number of replicas before it is returned in the
139139
results.
140-
:param str selector: Dictionary object describing criteria used to
140+
:param dict selector: Dictionary object describing criteria used to
141141
select documents.
142142
:param int skip: Skip the first 'n' results, where 'n' is the value
143143
specified.
@@ -201,7 +201,7 @@ def custom_result(self, **options):
201201
:param int r: Read quorum needed for the result. Each document is read
202202
from at least 'r' number of replicas before it is returned in the
203203
results.
204-
:param str selector: Dictionary object describing criteria used to
204+
:param dict selector: Dictionary object describing criteria used to
205205
select documents.
206206
:param list sort: A list of fields to sort by. Optionally the list can
207207
contain elements that are single member dictionary structures that

src/cloudant/result.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python
2-
# Copyright (C) 2015, 2018 IBM Corp. All rights reserved.
2+
# Copyright (C) 2015, 2019 IBM Corp. All rights reserved.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -454,7 +454,7 @@ class QueryResult(Result):
454454
:param int r: Read quorum needed for the result. Each document is read
455455
from at least 'r' number of replicas before it is returned in the
456456
results.
457-
:param str selector: Dictionary object describing criteria used to
457+
:param dict selector: Dictionary object describing criteria used to
458458
select documents.
459459
:param list sort: A list of fields to sort by. Optionally the list can
460460
contain elements that are single member dictionary structures that

0 commit comments

Comments
 (0)