Skip to content

Commit d0a8a6d

Browse files
committed
Replace string with str in rtypes.
Used the command: ag -l 'rtype: string' | xargs sed -i .bak 's/rtype: string/rtype: str/g' Based on this comment: googleapis/google-cloud-python#2485 (comment) `str` is a type, `string` is a module.
1 parent deb5225 commit d0a8a6d

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

google/cloud/pubsub/_helpers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def topic_name_from_path(path, project):
4545
:param project: The project associated with the request. It is
4646
included for validation purposes.
4747
48-
:rtype: string
48+
:rtype: str
4949
:returns: Topic name parsed from ``path``.
5050
:raises: :class:`ValueError` if the ``path`` is ill-formed or if
5151
the project from the ``path`` does not agree with the
@@ -64,7 +64,7 @@ def subscription_name_from_path(path, project):
6464
:param project: The project associated with the request. It is
6565
included for validation purposes.
6666
67-
:rtype: string
67+
:rtype: str
6868
:returns: subscription name parsed from ``path``.
6969
:raises: :class:`ValueError` if the ``path`` is ill-formed or if
7070
the project from the ``path`` does not agree with the

google/cloud/pubsub/connection.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def build_api_url(self, path, query_params=None,
8383
Typically you shouldn't provide this and instead
8484
use the default for the library.
8585
86-
:rtype: string
86+
:rtype: str
8787
:returns: The URL assembled from the pieces provided.
8888
"""
8989
if api_base_url is None:

google/cloud/pubsub/iam.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def user(email):
123123
:type email: string
124124
:param email: E-mail for this particular user.
125125
126-
:rtype: string
126+
:rtype: str
127127
:returns: A member string corresponding to the given user.
128128
"""
129129
return 'user:%s' % (email,)
@@ -135,7 +135,7 @@ def service_account(email):
135135
:type email: string
136136
:param email: E-mail for this particular service account.
137137
138-
:rtype: string
138+
:rtype: str
139139
:returns: A member string corresponding to the given service account.
140140
"""
141141
return 'serviceAccount:%s' % (email,)
@@ -147,7 +147,7 @@ def group(email):
147147
:type email: string
148148
:param email: An id or e-mail for this particular group.
149149
150-
:rtype: string
150+
:rtype: str
151151
:returns: A member string corresponding to the given group.
152152
"""
153153
return 'group:%s' % (email,)
@@ -159,7 +159,7 @@ def domain(domain):
159159
:type domain: string
160160
:param domain: The domain for this member.
161161
162-
:rtype: string
162+
:rtype: str
163163
:returns: A member string corresponding to the given domain.
164164
"""
165165
return 'domain:%s' % (domain,)
@@ -168,7 +168,7 @@ def domain(domain):
168168
def all_users():
169169
"""Factory method for a member representing all users.
170170
171-
:rtype: string
171+
:rtype: str
172172
:returns: A member string representing all users.
173173
"""
174174
return 'allUsers'
@@ -177,7 +177,7 @@ def all_users():
177177
def authenticated_users():
178178
"""Factory method for a member representing all authenticated users.
179179
180-
:rtype: string
180+
:rtype: str
181181
:returns: A member string representing all authenticated users.
182182
"""
183183
return 'allAuthenticatedUsers'

google/cloud/pubsub/message.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def timestamp(self):
7171
def service_timestamp(self):
7272
"""Return server-set timestamp.
7373
74-
:rtype: string
74+
:rtype: str
7575
:returns: timestamp (in UTC timezone) in RFC 3339 format
7676
"""
7777
return self._service_timestamp

0 commit comments

Comments
 (0)