Skip to content

Commit b226ede

Browse files
authored
Merge pull request #2579 from tswast/str-not-string
Replace types string with str.
2 parents ba69e71 + 77bf180 commit b226ede

File tree

6 files changed

+86
-86
lines changed

6 files changed

+86
-86
lines changed

packages/google-cloud-logging/google/cloud/logging/_gax.py

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def write_entries(self, entries, logger_name=None, resource=None,
9191
:type entries: sequence of mapping
9292
:param entries: the log entry resources to log.
9393
94-
:type logger_name: string
94+
:type logger_name: str
9595
:param logger_name: name of default logger to which to log the entries;
9696
individual entries may override.
9797
@@ -113,10 +113,10 @@ def write_entries(self, entries, logger_name=None, resource=None,
113113
def logger_delete(self, project, logger_name):
114114
"""API call: delete all entries in a logger via a DELETE request
115115
116-
:type project: string
116+
:type project: str
117117
:param project: ID of project containing the log entries to delete
118118
119-
:type logger_name: string
119+
:type logger_name: str
120120
:param logger_name: name of logger containing the log entries to delete
121121
"""
122122
options = None
@@ -142,7 +142,7 @@ def __init__(self, gax_api):
142142
def list_sinks(self, project, page_size=0, page_token=None):
143143
"""List sinks for the project associated with this client.
144144
145-
:type project: string
145+
:type project: str
146146
:param project: ID of the project whose sinks are to be listed.
147147
148148
:type page_size: int
@@ -176,17 +176,17 @@ def sink_create(self, project, sink_name, filter_, destination):
176176
See:
177177
https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/create
178178
179-
:type project: string
179+
:type project: str
180180
:param project: ID of the project in which to create the sink.
181181
182-
:type sink_name: string
182+
:type sink_name: str
183183
:param sink_name: the name of the sink
184184
185-
:type filter_: string
185+
:type filter_: str
186186
:param filter_: the advanced logs filter expression defining the
187187
entries exported by the sink.
188188
189-
:type destination: string
189+
:type destination: str
190190
:param destination: destination URI for the entries exported by
191191
the sink.
192192
"""
@@ -205,10 +205,10 @@ def sink_create(self, project, sink_name, filter_, destination):
205205
def sink_get(self, project, sink_name):
206206
"""API call: retrieve a sink resource.
207207
208-
:type project: string
208+
:type project: str
209209
:param project: ID of the project containing the sink.
210210
211-
:type sink_name: string
211+
:type sink_name: str
212212
:param sink_name: the name of the sink
213213
214214
:rtype: dict
@@ -228,17 +228,17 @@ def sink_get(self, project, sink_name):
228228
def sink_update(self, project, sink_name, filter_, destination):
229229
"""API call: update a sink resource.
230230
231-
:type project: string
231+
:type project: str
232232
:param project: ID of the project containing the sink.
233233
234-
:type sink_name: string
234+
:type sink_name: str
235235
:param sink_name: the name of the sink
236236
237-
:type filter_: string
237+
:type filter_: str
238238
:param filter_: the advanced logs filter expression defining the
239239
entries exported by the sink.
240240
241-
:type destination: string
241+
:type destination: str
242242
:param destination: destination URI for the entries exported by
243243
the sink.
244244
@@ -260,10 +260,10 @@ def sink_update(self, project, sink_name, filter_, destination):
260260
def sink_delete(self, project, sink_name):
261261
"""API call: delete a sink resource.
262262
263-
:type project: string
263+
:type project: str
264264
:param project: ID of the project containing the sink.
265265
266-
:type sink_name: string
266+
:type sink_name: str
267267
:param sink_name: the name of the sink
268268
"""
269269
options = None
@@ -289,7 +289,7 @@ def __init__(self, gax_api):
289289
def list_metrics(self, project, page_size=0, page_token=None):
290290
"""List metrics for the project associated with this client.
291291
292-
:type project: string
292+
:type project: str
293293
:param project: ID of the project whose metrics are to be listed.
294294
295295
:type page_size: int
@@ -323,17 +323,17 @@ def metric_create(self, project, metric_name, filter_, description):
323323
See:
324324
https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.metrics/create
325325
326-
:type project: string
326+
:type project: str
327327
:param project: ID of the project in which to create the metric.
328328
329-
:type metric_name: string
329+
:type metric_name: str
330330
:param metric_name: the name of the metric
331331
332-
:type filter_: string
332+
:type filter_: str
333333
:param filter_: the advanced logs filter expression defining the
334334
entries exported by the metric.
335335
336-
:type description: string
336+
:type description: str
337337
:param description: description of the metric.
338338
"""
339339
options = None
@@ -351,10 +351,10 @@ def metric_create(self, project, metric_name, filter_, description):
351351
def metric_get(self, project, metric_name):
352352
"""API call: retrieve a metric resource.
353353
354-
:type project: string
354+
:type project: str
355355
:param project: ID of the project containing the metric.
356356
357-
:type metric_name: string
357+
:type metric_name: str
358358
:param metric_name: the name of the metric
359359
360360
:rtype: dict
@@ -374,17 +374,17 @@ def metric_get(self, project, metric_name):
374374
def metric_update(self, project, metric_name, filter_, description):
375375
"""API call: update a metric resource.
376376
377-
:type project: string
377+
:type project: str
378378
:param project: ID of the project containing the metric.
379379
380-
:type metric_name: string
380+
:type metric_name: str
381381
:param metric_name: the name of the metric
382382
383-
:type filter_: string
383+
:type filter_: str
384384
:param filter_: the advanced logs filter expression defining the
385385
entries exported by the metric.
386386
387-
:type description: string
387+
:type description: str
388388
:param description: description of the metric.
389389
390390
:rtype: dict
@@ -406,10 +406,10 @@ def metric_update(self, project, metric_name, filter_, description):
406406
def metric_delete(self, project, metric_name):
407407
"""API call: delete a metric resource.
408408
409-
:type project: string
409+
:type project: str
410410
:param project: ID of the project containing the metric.
411411
412-
:type metric_name: string
412+
:type metric_name: str
413413
:param metric_name: the name of the metric
414414
"""
415415
options = None

packages/google-cloud-logging/google/cloud/logging/connection.py

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Connection(base_connection.JSONConnection):
2727
:type http: :class:`httplib2.Http` or class that defines ``request()``.
2828
:param http: (Optional) HTTP object to make requests.
2929
30-
:type api_base_url: string
30+
:type api_base_url: str
3131
:param api_base_url: The base of the API call URL. Defaults to the value
3232
:attr:`Connection.API_BASE_URL`.
3333
"""
@@ -123,7 +123,7 @@ def write_entries(self, entries, logger_name=None, resource=None,
123123
:type entries: sequence of mapping
124124
:param entries: the log entry resources to log.
125125
126-
:type logger_name: string
126+
:type logger_name: str
127127
:param logger_name: name of default logger to which to log the entries;
128128
individual entries may override.
129129
@@ -155,10 +155,10 @@ def logger_delete(self, project, logger_name):
155155
See:
156156
https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.logs/delete
157157
158-
:type project: string
158+
:type project: str
159159
:param project: ID of project containing the log entries to delete
160160
161-
:type logger_name: string
161+
:type logger_name: str
162162
:param logger_name: name of logger containing the log entries to delete
163163
"""
164164
path = '/projects/%s/logs/%s' % (project, logger_name)
@@ -183,7 +183,7 @@ def list_sinks(self, project, page_size=None, page_token=None):
183183
See:
184184
https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/list
185185
186-
:type project: string
186+
:type project: str
187187
:param project: ID of the project whose sinks are to be listed.
188188
189189
:type page_size: int
@@ -220,17 +220,17 @@ def sink_create(self, project, sink_name, filter_, destination):
220220
See:
221221
https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/create
222222
223-
:type project: string
223+
:type project: str
224224
:param project: ID of the project in which to create the sink.
225225
226-
:type sink_name: string
226+
:type sink_name: str
227227
:param sink_name: the name of the sink
228228
229-
:type filter_: string
229+
:type filter_: str
230230
:param filter_: the advanced logs filter expression defining the
231231
entries exported by the sink.
232232
233-
:type destination: string
233+
:type destination: str
234234
:param destination: destination URI for the entries exported by
235235
the sink.
236236
"""
@@ -248,10 +248,10 @@ def sink_get(self, project, sink_name):
248248
See:
249249
https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/get
250250
251-
:type project: string
251+
:type project: str
252252
:param project: ID of the project containing the sink.
253253
254-
:type sink_name: string
254+
:type sink_name: str
255255
:param sink_name: the name of the sink
256256
257257
:rtype: dict
@@ -266,17 +266,17 @@ def sink_update(self, project, sink_name, filter_, destination):
266266
See:
267267
https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/update
268268
269-
:type project: string
269+
:type project: str
270270
:param project: ID of the project containing the sink.
271271
272-
:type sink_name: string
272+
:type sink_name: str
273273
:param sink_name: the name of the sink
274274
275-
:type filter_: string
275+
:type filter_: str
276276
:param filter_: the advanced logs filter expression defining the
277277
entries exported by the sink.
278278
279-
:type destination: string
279+
:type destination: str
280280
:param destination: destination URI for the entries exported by
281281
the sink.
282282
"""
@@ -294,10 +294,10 @@ def sink_delete(self, project, sink_name):
294294
See:
295295
https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/delete
296296
297-
:type project: string
297+
:type project: str
298298
:param project: ID of the project containing the sink.
299299
300-
:type sink_name: string
300+
:type sink_name: str
301301
:param sink_name: the name of the sink
302302
"""
303303
target = '/projects/%s/sinks/%s' % (project, sink_name)
@@ -322,7 +322,7 @@ def list_metrics(self, project, page_size=None, page_token=None):
322322
See:
323323
https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.metrics/list
324324
325-
:type project: string
325+
:type project: str
326326
:param project: ID of the project whose metrics are to be listed.
327327
328328
:type page_size: int
@@ -359,17 +359,17 @@ def metric_create(self, project, metric_name, filter_, description=None):
359359
See:
360360
https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.metrics/create
361361
362-
:type project: string
362+
:type project: str
363363
:param project: ID of the project in which to create the metric.
364364
365-
:type metric_name: string
365+
:type metric_name: str
366366
:param metric_name: the name of the metric
367367
368-
:type filter_: string
368+
:type filter_: str
369369
:param filter_: the advanced logs filter expression defining the
370370
entries exported by the metric.
371371
372-
:type description: string
372+
:type description: str
373373
:param description: description of the metric.
374374
"""
375375
target = '/projects/%s/metrics' % (project,)
@@ -386,10 +386,10 @@ def metric_get(self, project, metric_name):
386386
See:
387387
https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.metrics/get
388388
389-
:type project: string
389+
:type project: str
390390
:param project: ID of the project containing the metric.
391391
392-
:type metric_name: string
392+
:type metric_name: str
393393
:param metric_name: the name of the metric
394394
395395
:rtype: dict
@@ -404,17 +404,17 @@ def metric_update(self, project, metric_name, filter_, description):
404404
See:
405405
https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.metrics/update
406406
407-
:type project: string
407+
:type project: str
408408
:param project: ID of the project containing the metric.
409409
410-
:type metric_name: string
410+
:type metric_name: str
411411
:param metric_name: the name of the metric
412412
413-
:type filter_: string
413+
:type filter_: str
414414
:param filter_: the advanced logs filter expression defining the
415415
entries exported by the metric.
416416
417-
:type description: string
417+
:type description: str
418418
:param description: description of the metric.
419419
"""
420420
target = '/projects/%s/metrics/%s' % (project, metric_name)
@@ -431,10 +431,10 @@ def metric_delete(self, project, metric_name):
431431
See:
432432
https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.metrics/delete
433433
434-
:type project: string
434+
:type project: str
435435
:param project: ID of the project containing the metric.
436436
437-
:type metric_name: string
437+
:type metric_name: str
438438
:param metric_name: the name of the metric.
439439
"""
440440
target = '/projects/%s/metrics/%s' % (project, metric_name)

packages/google-cloud-logging/google/cloud/logging/entries.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class _BaseEntry(object):
6565
:type labels: dict or :class:`NoneType`
6666
:param labels: (optional) mapping of labels for the entry
6767
68-
:type severity: string or :class:`NoneType`
68+
:type severity: str or :class:`NoneType`
6969
:param severity: (optional) severity of event being logged.
7070
7171
:type http_request: dict or :class:`NoneType`

0 commit comments

Comments
 (0)