Skip to content

Commit

Permalink
Merge pull request googleapis#2580 from tswast/int-not-integer
Browse files Browse the repository at this point in the history
Replaces integer with int in types and rtypes.
  • Loading branch information
dhermes authored Oct 21, 2016
2 parents 57861ed + 20e8c7f commit 33e9ec7
Show file tree
Hide file tree
Showing 20 changed files with 96 additions and 96 deletions.
4 changes: 2 additions & 2 deletions bigquery/google/cloud/bigquery/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def self_link(self):
def default_table_expiration_ms(self):
"""Default expiration time for tables in the dataset.
:rtype: integer, or ``NoneType``
:rtype: int, or ``NoneType``
:returns: The time in milliseconds, or None (the default).
"""
return self._properties.get('defaultTableExpirationMs')
Expand All @@ -216,7 +216,7 @@ def default_table_expiration_ms(self):
def default_table_expiration_ms(self, value):
"""Update default expiration time for tables in the dataset.
:type value: integer, or ``NoneType``
:type value: int, or ``NoneType``
:param value: new default time, in milliseconds
:raises: ValueError for invalid value types.
Expand Down
8 changes: 4 additions & 4 deletions bigquery/google/cloud/bigquery/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ def schema(self, value):
def input_file_bytes(self):
"""Count of bytes loaded from source files.
:rtype: integer, or ``NoneType``
:rtype: int, or ``NoneType``
:returns: the count (None until set from the server).
"""
statistics = self._properties.get('statistics')
Expand All @@ -466,7 +466,7 @@ def input_file_bytes(self):
def input_files(self):
"""Count of source files.
:rtype: integer, or ``NoneType``
:rtype: int, or ``NoneType``
:returns: the count (None until set from the server).
"""
statistics = self._properties.get('statistics')
Expand All @@ -477,7 +477,7 @@ def input_files(self):
def output_bytes(self):
"""Count of bytes saved to destination table.
:rtype: integer, or ``NoneType``
:rtype: int, or ``NoneType``
:returns: the count (None until set from the server).
"""
statistics = self._properties.get('statistics')
Expand All @@ -488,7 +488,7 @@ def output_bytes(self):
def output_rows(self):
"""Count of rows saved to destination table.
:rtype: integer, or ``NoneType``
:rtype: int, or ``NoneType``
:returns: the count (None until set from the server).
"""
statistics = self._properties.get('statistics')
Expand Down
10 changes: 5 additions & 5 deletions bigquery/google/cloud/bigquery/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def total_rows(self):
See:
https://cloud.google.com/bigquery/docs/reference/v2/jobs/query#totalRows
:rtype: integer, or ``NoneType``
:rtype: int, or ``NoneType``
:returns: Count generated on the server (None until set by the server).
"""
return self._properties.get('totalRows')
Expand All @@ -209,7 +209,7 @@ def total_bytes_processed(self):
See:
https://cloud.google.com/bigquery/docs/reference/v2/jobs/query#totalBytesProcessed
:rtype: integer, or ``NoneType``
:rtype: int, or ``NoneType``
:returns: Count generated on the server (None until set by the server).
"""
return self._properties.get('totalBytesProcessed')
Expand Down Expand Up @@ -345,16 +345,16 @@ def fetch_data(self, max_results=None, page_token=None, start_index=None,
See:
https://cloud.google.com/bigquery/docs/reference/v2/jobs/getQueryResults
:type max_results: integer or ``NoneType``
:type max_results: int or ``NoneType``
:param max_results: maximum number of rows to return.
:type page_token: str or ``NoneType``
:param page_token: token representing a cursor into the table's rows.
:type start_index: integer or ``NoneType``
:type start_index: int or ``NoneType``
:param start_index: zero-based index of starting row
:type timeout_ms: integer or ``NoneType``
:type timeout_ms: int or ``NoneType``
:param timeout_ms: timeout, in milliseconds, to wait for query to
complete
Expand Down
12 changes: 6 additions & 6 deletions bigquery/google/cloud/bigquery/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def modified(self):
def num_bytes(self):
"""The size of the table in bytes.
:rtype: integer, or ``NoneType``
:rtype: int, or ``NoneType``
:returns: the byte count (None until set from the server).
"""
num_bytes_as_str = self._properties.get('numBytes')
Expand All @@ -162,7 +162,7 @@ def num_bytes(self):
def num_rows(self):
"""The number of rows in the table.
:rtype: integer, or ``NoneType``
:rtype: int, or ``NoneType``
:returns: the row count (None until set from the server).
"""
num_rows_as_str = self._properties.get('numRows')
Expand Down Expand Up @@ -654,7 +654,7 @@ def fetch_data(self, max_results=None, page_token=None, client=None):
incomplete. To ensure that the local copy of the schema is
up-to-date, call the table's ``reload`` method.
:type max_results: integer or ``NoneType``
:type max_results: int or ``NoneType``
:param max_results: maximum number of rows to return.
:type page_token: str or ``NoneType``
Expand Down Expand Up @@ -836,7 +836,7 @@ def upload_from_file(self,
:func:`os.fstat`. (If the file handle is not from the
filesystem this won't be possible.)
:type num_retries: integer
:type num_retries: int
:param num_retries: Number of upload retries. Defaults to 6.
:type allow_jagged_rows: bool
Expand All @@ -863,15 +863,15 @@ def upload_from_file(self,
:param ignore_unknown_values: job configuration option; see
:meth:`google.cloud.bigquery.job.LoadJob`.
:type max_bad_records: integer
:type max_bad_records: int
:param max_bad_records: job configuration option; see
:meth:`google.cloud.bigquery.job.LoadJob`.
:type quote_character: str
:param quote_character: job configuration option; see
:meth:`google.cloud.bigquery.job.LoadJob`.
:type skip_leading_rows: integer
:type skip_leading_rows: int
:param skip_leading_rows: job configuration option; see
:meth:`google.cloud.bigquery.job.LoadJob`.
Expand Down
10 changes: 5 additions & 5 deletions core/google/cloud/streaming/buffered_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ class BufferedStream(object):
:type stream: readable file-like object
:param stream: the stream to be buffered
:type start: integer
:type start: int
:param start: the starting point in the stream
:type size: integer
:type size: int
:param size: the size of the buffer
"""
def __init__(self, stream, start, size):
Expand Down Expand Up @@ -64,7 +64,7 @@ def stream_exhausted(self):
def stream_end_position(self):
"""Point to which stream was read into the buffer
:rtype: integer
:rtype: int
:returns: The end-position of the stream.
"""
return self._end_pos
Expand All @@ -73,15 +73,15 @@ def stream_end_position(self):
def _bytes_remaining(self):
"""Bytes remaining to be read from the buffer
:rtype: integer
:rtype: int
:returns: The number of bytes remaining.
"""
return len(self._buffered_data) - self._buffer_pos

def read(self, size=None):
"""Read bytes from the buffer.
:type size: integer or None
:type size: int or None
:param size: How many bytes to read (defaults to all remaining bytes).
:rtype: str
Expand Down
4 changes: 2 additions & 2 deletions core/google/cloud/streaming/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __str__(self):
def status_code(self):
"""Status code for the response.
:rtype: integer
:rtype: int
:returns: the code
"""
return int(self.response['status'])
Expand Down Expand Up @@ -97,7 +97,7 @@ class RetryAfterError(HttpError):
:type url: str
:param url: URL of the response which returned the error.
:type retry_after: integer
:type retry_after: int
:param retry_after: seconds to wait before retrying.
"""
def __init__(self, response, content, url, retry_after):
Expand Down
16 changes: 8 additions & 8 deletions core/google/cloud/streaming/http_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def _httplib2_debug_level(http_request, level, http=None):
:type http_request: :class:`Request`
:param http_request: the request to be logged.
:type level: integer
:type level: int
:param level: the debuglevel for logging.
:type http: :class:`httplib2.Http`, or ``None``
Expand Down Expand Up @@ -191,7 +191,7 @@ def _process_content_range(content_range):
:type content_range: str
:param content_range: the header value being parsed.
:rtype: integer
:rtype: int
:returns: the length of the response chunk.
"""
_, _, range_spec = content_range.partition(' ')
Expand Down Expand Up @@ -221,7 +221,7 @@ def length(self):
Exposed as an attribute since using ``len()`` directly can fail
for responses larger than ``sys.maxint``.
:rtype: integer or long
:rtype: int or long
:returns: The length of the response.
"""
if 'content-encoding' in self.info and 'content-range' in self.info:
Expand All @@ -239,7 +239,7 @@ def length(self):
def status_code(self):
"""HTTP status code
:rtype: integer
:rtype: int
:returns: The response status code.
"""
return int(self.info['status'])
Expand All @@ -248,7 +248,7 @@ def status_code(self):
def retry_after(self):
"""Retry interval (if set).
:rtype: integer
:rtype: int
:returns: interval in seconds
"""
if 'retry-after' in self.info:
Expand Down Expand Up @@ -319,7 +319,7 @@ def _make_api_request_no_retry(http, http_request, redirections=_REDIRECTIONS):
:type http_request: :class:`Request`
:param http_request: the request to send.
:type redirections: integer
:type redirections: int
:param redirections: Number of redirects to follow.
:rtype: :class:`Response`
Expand Down Expand Up @@ -363,11 +363,11 @@ def make_api_request(http, http_request, retries=7,
:type http_request: :class:`Request`
:param http_request: the request to send.
:type retries: integer
:type retries: int
:param retries: Number of retries to attempt on retryable
responses (such as 429 or 5XX).
:type redirections: integer
:type redirections: int
:param redirections: Number of redirects to follow.
:rtype: :class:`Response`
Expand Down
6 changes: 3 additions & 3 deletions core/google/cloud/streaming/stream_slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class StreamSlice(object):
:type stream: readable file-like object
:param stream: the stream to be buffered.
:type max_bytes: integer
:type max_bytes: int
:param max_bytes: maximum number of bytes to return in the slice.
"""
def __init__(self, stream, max_bytes):
Expand Down Expand Up @@ -51,7 +51,7 @@ def length(self):
For 32-bit python2.x, len() cannot exceed a 32-bit number.
:rtype: integer
:rtype: int
:returns: The max "length" of the stream.
"""
return self._max_bytes
Expand All @@ -65,7 +65,7 @@ def read(self, size=None):
slice indicates we should still be able to read more bytes, we
raise :exc:`IncompleteRead`.
:type size: integer or None
:type size: int or None
:param size: If provided, read no more than size bytes from the stream.
:rtype: bytes
Expand Down
Loading

0 comments on commit 33e9ec7

Please sign in to comment.