Skip to content

Commit 33e9ec7

Browse files
authored
Merge pull request googleapis#2580 from tswast/int-not-integer
Replaces integer with int in types and rtypes.
2 parents 57861ed + 20e8c7f commit 33e9ec7

File tree

20 files changed

+96
-96
lines changed

20 files changed

+96
-96
lines changed

bigquery/google/cloud/bigquery/dataset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def self_link(self):
207207
def default_table_expiration_ms(self):
208208
"""Default expiration time for tables in the dataset.
209209
210-
:rtype: integer, or ``NoneType``
210+
:rtype: int, or ``NoneType``
211211
:returns: The time in milliseconds, or None (the default).
212212
"""
213213
return self._properties.get('defaultTableExpirationMs')
@@ -216,7 +216,7 @@ def default_table_expiration_ms(self):
216216
def default_table_expiration_ms(self, value):
217217
"""Update default expiration time for tables in the dataset.
218218
219-
:type value: integer, or ``NoneType``
219+
:type value: int, or ``NoneType``
220220
:param value: new default time, in milliseconds
221221
222222
:raises: ValueError for invalid value types.

bigquery/google/cloud/bigquery/job.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ def schema(self, value):
455455
def input_file_bytes(self):
456456
"""Count of bytes loaded from source files.
457457
458-
:rtype: integer, or ``NoneType``
458+
:rtype: int, or ``NoneType``
459459
:returns: the count (None until set from the server).
460460
"""
461461
statistics = self._properties.get('statistics')
@@ -466,7 +466,7 @@ def input_file_bytes(self):
466466
def input_files(self):
467467
"""Count of source files.
468468
469-
:rtype: integer, or ``NoneType``
469+
:rtype: int, or ``NoneType``
470470
:returns: the count (None until set from the server).
471471
"""
472472
statistics = self._properties.get('statistics')
@@ -477,7 +477,7 @@ def input_files(self):
477477
def output_bytes(self):
478478
"""Count of bytes saved to destination table.
479479
480-
:rtype: integer, or ``NoneType``
480+
:rtype: int, or ``NoneType``
481481
:returns: the count (None until set from the server).
482482
"""
483483
statistics = self._properties.get('statistics')
@@ -488,7 +488,7 @@ def output_bytes(self):
488488
def output_rows(self):
489489
"""Count of rows saved to destination table.
490490
491-
:rtype: integer, or ``NoneType``
491+
:rtype: int, or ``NoneType``
492492
:returns: the count (None until set from the server).
493493
"""
494494
statistics = self._properties.get('statistics')

bigquery/google/cloud/bigquery/query.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def total_rows(self):
197197
See:
198198
https://cloud.google.com/bigquery/docs/reference/v2/jobs/query#totalRows
199199
200-
:rtype: integer, or ``NoneType``
200+
:rtype: int, or ``NoneType``
201201
:returns: Count generated on the server (None until set by the server).
202202
"""
203203
return self._properties.get('totalRows')
@@ -209,7 +209,7 @@ def total_bytes_processed(self):
209209
See:
210210
https://cloud.google.com/bigquery/docs/reference/v2/jobs/query#totalBytesProcessed
211211
212-
:rtype: integer, or ``NoneType``
212+
:rtype: int, or ``NoneType``
213213
:returns: Count generated on the server (None until set by the server).
214214
"""
215215
return self._properties.get('totalBytesProcessed')
@@ -345,16 +345,16 @@ def fetch_data(self, max_results=None, page_token=None, start_index=None,
345345
See:
346346
https://cloud.google.com/bigquery/docs/reference/v2/jobs/getQueryResults
347347
348-
:type max_results: integer or ``NoneType``
348+
:type max_results: int or ``NoneType``
349349
:param max_results: maximum number of rows to return.
350350
351351
:type page_token: str or ``NoneType``
352352
:param page_token: token representing a cursor into the table's rows.
353353
354-
:type start_index: integer or ``NoneType``
354+
:type start_index: int or ``NoneType``
355355
:param start_index: zero-based index of starting row
356356
357-
:type timeout_ms: integer or ``NoneType``
357+
:type timeout_ms: int or ``NoneType``
358358
:param timeout_ms: timeout, in milliseconds, to wait for query to
359359
complete
360360

bigquery/google/cloud/bigquery/table.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def modified(self):
151151
def num_bytes(self):
152152
"""The size of the table in bytes.
153153
154-
:rtype: integer, or ``NoneType``
154+
:rtype: int, or ``NoneType``
155155
:returns: the byte count (None until set from the server).
156156
"""
157157
num_bytes_as_str = self._properties.get('numBytes')
@@ -162,7 +162,7 @@ def num_bytes(self):
162162
def num_rows(self):
163163
"""The number of rows in the table.
164164
165-
:rtype: integer, or ``NoneType``
165+
:rtype: int, or ``NoneType``
166166
:returns: the row count (None until set from the server).
167167
"""
168168
num_rows_as_str = self._properties.get('numRows')
@@ -654,7 +654,7 @@ def fetch_data(self, max_results=None, page_token=None, client=None):
654654
incomplete. To ensure that the local copy of the schema is
655655
up-to-date, call the table's ``reload`` method.
656656
657-
:type max_results: integer or ``NoneType``
657+
:type max_results: int or ``NoneType``
658658
:param max_results: maximum number of rows to return.
659659
660660
:type page_token: str or ``NoneType``
@@ -836,7 +836,7 @@ def upload_from_file(self,
836836
:func:`os.fstat`. (If the file handle is not from the
837837
filesystem this won't be possible.)
838838
839-
:type num_retries: integer
839+
:type num_retries: int
840840
:param num_retries: Number of upload retries. Defaults to 6.
841841
842842
:type allow_jagged_rows: bool
@@ -863,15 +863,15 @@ def upload_from_file(self,
863863
:param ignore_unknown_values: job configuration option; see
864864
:meth:`google.cloud.bigquery.job.LoadJob`.
865865
866-
:type max_bad_records: integer
866+
:type max_bad_records: int
867867
:param max_bad_records: job configuration option; see
868868
:meth:`google.cloud.bigquery.job.LoadJob`.
869869
870870
:type quote_character: str
871871
:param quote_character: job configuration option; see
872872
:meth:`google.cloud.bigquery.job.LoadJob`.
873873
874-
:type skip_leading_rows: integer
874+
:type skip_leading_rows: int
875875
:param skip_leading_rows: job configuration option; see
876876
:meth:`google.cloud.bigquery.job.LoadJob`.
877877

core/google/cloud/streaming/buffered_stream.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ class BufferedStream(object):
2424
:type stream: readable file-like object
2525
:param stream: the stream to be buffered
2626
27-
:type start: integer
27+
:type start: int
2828
:param start: the starting point in the stream
2929
30-
:type size: integer
30+
:type size: int
3131
:param size: the size of the buffer
3232
"""
3333
def __init__(self, stream, start, size):
@@ -64,7 +64,7 @@ def stream_exhausted(self):
6464
def stream_end_position(self):
6565
"""Point to which stream was read into the buffer
6666
67-
:rtype: integer
67+
:rtype: int
6868
:returns: The end-position of the stream.
6969
"""
7070
return self._end_pos
@@ -73,15 +73,15 @@ def stream_end_position(self):
7373
def _bytes_remaining(self):
7474
"""Bytes remaining to be read from the buffer
7575
76-
:rtype: integer
76+
:rtype: int
7777
:returns: The number of bytes remaining.
7878
"""
7979
return len(self._buffered_data) - self._buffer_pos
8080

8181
def read(self, size=None):
8282
"""Read bytes from the buffer.
8383
84-
:type size: integer or None
84+
:type size: int or None
8585
:param size: How many bytes to read (defaults to all remaining bytes).
8686
8787
:rtype: str

core/google/cloud/streaming/exceptions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def __str__(self):
5050
def status_code(self):
5151
"""Status code for the response.
5252
53-
:rtype: integer
53+
:rtype: int
5454
:returns: the code
5555
"""
5656
return int(self.response['status'])
@@ -97,7 +97,7 @@ class RetryAfterError(HttpError):
9797
:type url: str
9898
:param url: URL of the response which returned the error.
9999
100-
:type retry_after: integer
100+
:type retry_after: int
101101
:param retry_after: seconds to wait before retrying.
102102
"""
103103
def __init__(self, response, content, url, retry_after):

core/google/cloud/streaming/http_wrapper.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def _httplib2_debug_level(http_request, level, http=None):
7777
:type http_request: :class:`Request`
7878
:param http_request: the request to be logged.
7979
80-
:type level: integer
80+
:type level: int
8181
:param level: the debuglevel for logging.
8282
8383
:type http: :class:`httplib2.Http`, or ``None``
@@ -191,7 +191,7 @@ def _process_content_range(content_range):
191191
:type content_range: str
192192
:param content_range: the header value being parsed.
193193
194-
:rtype: integer
194+
:rtype: int
195195
:returns: the length of the response chunk.
196196
"""
197197
_, _, range_spec = content_range.partition(' ')
@@ -221,7 +221,7 @@ def length(self):
221221
Exposed as an attribute since using ``len()`` directly can fail
222222
for responses larger than ``sys.maxint``.
223223
224-
:rtype: integer or long
224+
:rtype: int or long
225225
:returns: The length of the response.
226226
"""
227227
if 'content-encoding' in self.info and 'content-range' in self.info:
@@ -239,7 +239,7 @@ def length(self):
239239
def status_code(self):
240240
"""HTTP status code
241241
242-
:rtype: integer
242+
:rtype: int
243243
:returns: The response status code.
244244
"""
245245
return int(self.info['status'])
@@ -248,7 +248,7 @@ def status_code(self):
248248
def retry_after(self):
249249
"""Retry interval (if set).
250250
251-
:rtype: integer
251+
:rtype: int
252252
:returns: interval in seconds
253253
"""
254254
if 'retry-after' in self.info:
@@ -319,7 +319,7 @@ def _make_api_request_no_retry(http, http_request, redirections=_REDIRECTIONS):
319319
:type http_request: :class:`Request`
320320
:param http_request: the request to send.
321321
322-
:type redirections: integer
322+
:type redirections: int
323323
:param redirections: Number of redirects to follow.
324324
325325
:rtype: :class:`Response`
@@ -363,11 +363,11 @@ def make_api_request(http, http_request, retries=7,
363363
:type http_request: :class:`Request`
364364
:param http_request: the request to send.
365365
366-
:type retries: integer
366+
:type retries: int
367367
:param retries: Number of retries to attempt on retryable
368368
responses (such as 429 or 5XX).
369369
370-
:type redirections: integer
370+
:type redirections: int
371371
:param redirections: Number of redirects to follow.
372372
373373
:rtype: :class:`Response`

core/google/cloud/streaming/stream_slice.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class StreamSlice(object):
2323
:type stream: readable file-like object
2424
:param stream: the stream to be buffered.
2525
26-
:type max_bytes: integer
26+
:type max_bytes: int
2727
:param max_bytes: maximum number of bytes to return in the slice.
2828
"""
2929
def __init__(self, stream, max_bytes):
@@ -51,7 +51,7 @@ def length(self):
5151
5252
For 32-bit python2.x, len() cannot exceed a 32-bit number.
5353
54-
:rtype: integer
54+
:rtype: int
5555
:returns: The max "length" of the stream.
5656
"""
5757
return self._max_bytes
@@ -65,7 +65,7 @@ def read(self, size=None):
6565
slice indicates we should still be able to read more bytes, we
6666
raise :exc:`IncompleteRead`.
6767
68-
:type size: integer or None
68+
:type size: int or None
6969
:param size: If provided, read no more than size bytes from the stream.
7070
7171
:rtype: bytes

0 commit comments

Comments
 (0)