Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c5ded2a

Browse files
committed
Replace types boolean with bool.
Uses the command: ag -l 'type ([^:]+): boolean' | \ xargs gsed -r -i.bak -e 's/type ([^:]+): boolean/type \1: bool/g'
1 parent 60862d1 commit c5ded2a

File tree

14 files changed

+37
-37
lines changed

14 files changed

+37
-37
lines changed

bigquery/google/cloud/bigquery/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def list_datasets(self, include_all=False, max_results=None,
103103
See:
104104
https://cloud.google.com/bigquery/docs/reference/v2/datasets/list
105105
106-
:type include_all: boolean
106+
:type include_all: bool
107107
:param include_all: True if results include hidden datasets.
108108
109109
:type max_results: int
@@ -180,7 +180,7 @@ def list_jobs(self, max_results=None, page_token=None, all_users=None,
180180
not passed, the API will return the first page of
181181
jobs.
182182
183-
:type all_users: boolean
183+
:type all_users: bool
184184
:param all_users: if true, include jobs owned by all users in the
185185
project.
186186

bigquery/google/cloud/bigquery/table.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -714,10 +714,10 @@ def insert_data(self,
714714
:param row_ids: Unique ids, one per row being inserted. If not
715715
passed, no de-duplication occurs.
716716
717-
:type skip_invalid_rows: boolean or ``NoneType``
717+
:type skip_invalid_rows: bool or ``NoneType``
718718
:param skip_invalid_rows: skip rows w/ invalid data?
719719
720-
:type ignore_unknown_values: boolean or ``NoneType``
720+
:type ignore_unknown_values: bool or ``NoneType``
721721
:param ignore_unknown_values: ignore columns beyond schema?
722722
723723
:type template_suffix: str or ``NoneType``
@@ -826,7 +826,7 @@ def upload_from_file(self,
826826
job configuration option; see
827827
:meth:`google.cloud.bigquery.job.LoadJob`
828828
829-
:type rewind: boolean
829+
:type rewind: bool
830830
:param rewind: If True, seek to the beginning of the file handle before
831831
writing the file to Cloud Storage.
832832
@@ -839,11 +839,11 @@ def upload_from_file(self,
839839
:type num_retries: integer
840840
:param num_retries: Number of upload retries. Defaults to 6.
841841
842-
:type allow_jagged_rows: boolean
842+
:type allow_jagged_rows: bool
843843
:param allow_jagged_rows: job configuration option; see
844844
:meth:`google.cloud.bigquery.job.LoadJob`.
845845
846-
:type allow_quoted_newlines: boolean
846+
:type allow_quoted_newlines: bool
847847
:param allow_quoted_newlines: job configuration option; see
848848
:meth:`google.cloud.bigquery.job.LoadJob`.
849849
@@ -859,7 +859,7 @@ def upload_from_file(self,
859859
:param field_delimiter: job configuration option; see
860860
:meth:`google.cloud.bigquery.job.LoadJob`.
861861
862-
:type ignore_unknown_values: boolean
862+
:type ignore_unknown_values: bool
863863
:param ignore_unknown_values: job configuration option; see
864864
:meth:`google.cloud.bigquery.job.LoadJob`.
865865

core/google/cloud/_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ def _datetime_to_rfc3339(value, ignore_zone=True):
438438
:type value: :class:`datetime.datetime`
439439
:param value: The datetime object to be converted to a string.
440440
441-
:type ignore_zone: boolean
441+
:type ignore_zone: bool
442442
:param ignore_zone: If True, then the timezone (if any) of the datetime
443443
object is ignored.
444444

core/google/cloud/streaming/transfer.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ class _Transfer(object):
5252
:type stream: file-like object
5353
:param stream: stream to/from which data is downloaded/uploaded.
5454
55-
:type close_stream: boolean
55+
:type close_stream: bool
5656
:param close_stream: should this instance close the stream when deleted
5757
5858
:type chunksize: integer
5959
:param chunksize: the size of chunks used to download/upload a file.
6060
61-
:type auto_transfer: boolean
61+
:type auto_transfer: bool
6262
:param auto_transfer: should this instance automatically begin transfering
6363
data when initialized
6464
@@ -253,10 +253,10 @@ def from_file(cls, filename, overwrite=False, auto_transfer=True, **kwds):
253253
:type filename: str
254254
:param filename: path/filename for the target file
255255
256-
:type overwrite: boolean
256+
:type overwrite: bool
257257
:param overwrite: should an existing file be overwritten
258258
259-
:type auto_transfer: boolean
259+
:type auto_transfer: bool
260260
:param auto_transfer: should the transfer be started immediately
261261
262262
:type kwds: dict
@@ -283,7 +283,7 @@ def from_stream(cls, stream, auto_transfer=True, total_size=None, **kwds):
283283
:type total_size: integer or None
284284
:param total_size: total size of the file to be downloaded
285285
286-
:type auto_transfer: boolean
286+
:type auto_transfer: bool
287287
:param auto_transfer: should the transfer be started immediately
288288
289289
:type kwds: dict
@@ -460,7 +460,7 @@ def _compute_end_byte(self, start, end=None, use_chunks=True):
460460
:type end: integer or None
461461
:param end: suggested last byte of the range.
462462
463-
:type use_chunks: boolean
463+
:type use_chunks: bool
464464
:param use_chunks: If False, ignore :attr:`chunksize`.
465465
466466
:rtype: str
@@ -558,7 +558,7 @@ def get_range(self, start, end=None, use_chunks=True):
558558
:type end: integer or ``None``
559559
:param end: Where to stop fetching bytes. (See above.)
560560
561-
:type use_chunks: boolean
561+
:type use_chunks: bool
562562
:param use_chunks: If False, ignore :attr:`chunksize`
563563
and fetch this range in a single request.
564564
If True, streams via chunks.
@@ -594,7 +594,7 @@ def stream_file(self, use_chunks=True):
594594
595595
Writes retrieved bytes into :attr:`stream`.
596596
597-
:type use_chunks: boolean
597+
:type use_chunks: bool
598598
:param use_chunks: If False, ignore :attr:`chunksize`
599599
and stream this download in a single request.
600600
If True, streams via chunks.
@@ -631,10 +631,10 @@ class Upload(_Transfer):
631631
:type http: :class:`httplib2.Http` (or workalike)
632632
:param http: Http instance used to perform requests.
633633
634-
:type close_stream: boolean
634+
:type close_stream: bool
635635
:param close_stream: should this instance close the stream when deleted
636636
637-
:type auto_transfer: boolean
637+
:type auto_transfer: bool
638638
:param auto_transfer: should this instance automatically begin transfering
639639
data when initialized
640640
@@ -669,7 +669,7 @@ def from_file(cls, filename, mime_type=None, auto_transfer=True, **kwds):
669669
:type mime_type: str
670670
:param mime_type: MIMEtype of the file being uploaded
671671
672-
:type auto_transfer: boolean or None
672+
:type auto_transfer: bool or None
673673
:param auto_transfer: should the transfer be started immediately
674674
675675
:type kwds: dict
@@ -703,7 +703,7 @@ def from_stream(cls, stream, mime_type,
703703
:type total_size: integer or None
704704
:param total_size: Size of the file being uploaded
705705
706-
:type auto_transfer: boolean or None
706+
:type auto_transfer: bool or None
707707
:param auto_transfer: should the transfer be started immediately
708708
709709
:type kwds: dict
@@ -1065,7 +1065,7 @@ def _validate_chunksize(self, chunksize=None):
10651065
def stream_file(self, use_chunks=True):
10661066
"""Upload the stream.
10671067
1068-
:type use_chunks: boolean
1068+
:type use_chunks: bool
10691069
:param use_chunks: If False, send the stream in a single request.
10701070
Otherwise, send it in chunks.
10711071

monitoring/google/cloud/monitoring/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ def group(self, group_id=None, display_name=None, parent_id=None,
447447
The filter string used to determine which monitored resources
448448
belong to this group.
449449
450-
:type is_cluster: boolean
450+
:type is_cluster: bool
451451
:param is_cluster:
452452
If true, the members of this group are considered to be a cluster.
453453
The system can perform additional analysis on groups that are

monitoring/google/cloud/monitoring/group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class Group(object):
9292
The filter string used to determine which monitored resources belong to
9393
this group.
9494
95-
:type is_cluster: boolean
95+
:type is_cluster: bool
9696
:param is_cluster:
9797
If true, the members of this group are considered to be a cluster. The
9898
system can perform additional analysis on groups that are clusters.

monitoring/google/cloud/monitoring/query.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ def iter(self, headers_only=False, page_size=None):
442442
for timeseries in query.iter():
443443
...
444444
445-
:type headers_only: boolean
445+
:type headers_only: bool
446446
:param headers_only:
447447
Whether to omit the point data from the time series objects.
448448
@@ -505,7 +505,7 @@ def _build_query_params(self, headers_only=False,
505505
We use a series of key-value pairs (suitable for passing to
506506
``urlencode``) instead of a ``dict`` to allow for repeated fields.
507507
508-
:type headers_only: boolean
508+
:type headers_only: bool
509509
:param headers_only:
510510
Whether to omit the point data from the
511511
:class:`~google.cloud.monitoring.timeseries.TimeSeries` objects.

pubsub/google/cloud/pubsub/_gax.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ def subscription_pull(self, subscription_path, return_immediately=False,
376376
the fully-qualified path of the new subscription, in format
377377
``projects/<PROJECT>/subscriptions/<SUB_NAME>``.
378378
379-
:type return_immediately: boolean
379+
:type return_immediately: bool
380380
:param return_immediately: if True, the back-end returns even if no
381381
messages are available; if False, the API
382382
call blocks until one or more messages are

pubsub/google/cloud/pubsub/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def topic(self, name, timestamp_messages=False):
179179
:type name: str
180180
:param name: the name of the topic to be constructed.
181181
182-
:type timestamp_messages: boolean
182+
:type timestamp_messages: bool
183183
:param timestamp_messages: To be passed to ``Topic`` constructor.
184184
185185
:rtype: :class:`google.cloud.pubsub.topic.Topic`

pubsub/google/cloud/pubsub/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ def subscription_pull(self, subscription_path, return_immediately=False,
400400
the fully-qualified path of the new subscription, in format
401401
``projects/<PROJECT>/subscriptions/<SUB_NAME>``.
402402
403-
:type return_immediately: boolean
403+
:type return_immediately: bool
404404
:param return_immediately: if True, the back-end returns even if no
405405
messages are available; if False, the API
406406
call blocks until one or more messages are

0 commit comments

Comments
 (0)