GeezerVison is showing github.com — Don't use pylint disable and update alpha PyPI info. · dhermes/google-cloud-python@4cf536e
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: gcloud/credentials.py +4-2Lines changed: 4 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 18 | 18 | import calendar | 19 | 19 | import datetime | 20 | 20 | import six | 21 | | -from six.moves.urllib.parse import urlencode # pylint: disable=F0401 | 22 | 21 |
| 23 | 22 | from Crypto.Hash import SHA256 | 24 | 23 | from Crypto.PublicKey import RSA | | 29 | 28 | import pytz | 30 | 29 |
| 31 | 30 |
| | 31 | +URLENCODE = six.moves.urllib.parse.urlencode | | 32 | + | | 33 | + | 32 | 34 | def get_credentials(): | 33 | 35 | """Gets credentials implicitly from the current environment. | 34 | 36 |
| @@ -260,4 +262,4 @@ def generate_signed_url(credentials, resource, expiration, | 260 | 262 | # Return the built URL. | 261 | 263 | return '{endpoint}{resource}?{querystring}'.format( | 262 | 264 | endpoint=api_access_endpoint, resource=resource, | 263 | | - querystring=urlencode(query_params)) | | 265 | + querystring=URLENCODE(query_params)) |
Collapse file Copy file name to clipboardExpand all lines: gcloud/datastore/_implicit_environ.py +4-1Lines changed: 4 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 20 | 20 |
| 21 | 21 | import socket | 22 | 22 |
| 23 | | -from six.moves.http_client import HTTPConnection # pylint: disable=F0401 | | 23 | +import six | 24 | 24 |
| 25 | 25 | try: | 26 | 26 | from google.appengine.api import app_identity | 27 | 27 | except ImportError: | 28 | 28 | app_identity = None | 29 | 29 |
| 30 | 30 |
| | 31 | +HTTPConnection = six.moves.http_client.HTTPConnection | | 32 | + | | 33 | + | 31 | 34 | DATASET_ID = None | 32 | 35 | """Module global to allow persistent implied dataset ID from enviroment.""" | 33 | 36 |
| |
Collapse file Copy file name to clipboardExpand all lines: gcloud/storage/blob.py +5-2Lines changed: 5 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 20 | 20 | import time | 21 | 21 | import datetime | 22 | 22 | from io import BytesIO | 23 | | - | 24 | 23 | import six | 25 | | -from six.moves.urllib.parse import quote # pylint: disable=F0401 | | 24 | +import urllib | 26 | 25 |
| 27 | 26 | from _gcloud_vendor.apitools.base.py import http_wrapper | 28 | 27 | from _gcloud_vendor.apitools.base.py import transfer | | 33 | 32 | from gcloud.storage.acl import ObjectACL | 34 | 33 |
| 35 | 34 |
| | 35 | +try: | | 36 | + quote = urllib.quote | | 37 | +except AttributeError: # pragma: NO COVER Py3K | | 38 | + quote = urllib.parse.quote | 36 | 39 | _API_ACCESS_ENDPOINT = 'https://storage.googleapis.com' | 37 | 40 |
| 38 | 41 |
| |
Collapse file Copy file name to clipboardExpand all lines: gcloud/storage/connection.py +5-2Lines changed: 5 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 16 | 16 |
| 17 | 17 | import json | 18 | 18 |
| 19 | | -from six.moves.urllib.parse import urlencode # pylint: disable=F0401 | | 19 | +import six | 20 | 20 |
| 21 | 21 | from gcloud.connection import Connection as _Base | 22 | 22 | from gcloud.exceptions import make_exception | | 25 | 25 | from gcloud.storage.iterator import Iterator | 26 | 26 |
| 27 | 27 |
| | 28 | +URLENCODE = six.moves.urllib.parse.urlencode | | 29 | + | | 30 | + | 28 | 31 | class Connection(_Base): | 29 | 32 | """A connection to Google Cloud Storage via the JSON REST API. | 30 | 33 |
| @@ -127,7 +130,7 @@ def build_api_url(self, path, query_params=None, api_base_url=None, | 127 | 130 |
| 128 | 131 | query_params = query_params or {} | 129 | 132 | query_params.update({'project': self.project}) | 130 | | - url += '?' + urlencode(query_params) | | 133 | + url += '?' + URLENCODE(query_params) | 131 | 134 |
| 132 | 135 | return url | 133 | 136 |
| |
Collapse file Copy file name to clipboardExpand all lines: tox.ini +6-6Lines changed: 6 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -8,7 +8,7 @@ commands = | 8 | 8 | deps = | 9 | 9 | nose | 10 | 10 | unittest2 | 11 | | - protobuf==3.0.0-alpha1 | | 11 | + protobuf==3.0.0-alpha-1 | 12 | 12 |
| 13 | 13 | [testenv] | 14 | 14 | install_command = | @@ -18,7 +18,7 @@ commands = | 18 | 18 | deps = | 19 | 19 | nose | 20 | 20 | unittest2 | 21 | | - protobuf==3.0.0-alpha1 | | 21 | + protobuf==3.0.0-alpha-1 | 22 | 22 |
| 23 | 23 | [testenv:cover] | 24 | 24 | basepython = | @@ -28,7 +28,7 @@ commands = | 28 | 28 | deps = | 29 | 29 | nose | 30 | 30 | unittest2 | 31 | | - protobuf==3.0.0-alpha1 | | 31 | + protobuf==3.0.0-alpha-1 | 32 | 32 | coverage | 33 | 33 | nosexcover | 34 | 34 |
| | 64 | 64 | pep8 | 65 | 65 | pylint | 66 | 66 | unittest2 | 67 | | - protobuf==3.0.0-alpha1 | | 67 | + protobuf==3.0.0-alpha-1 | 68 | 68 |
| 69 | 69 | [testenv:regression] | 70 | 70 | basepython = | @@ -73,7 +73,7 @@ commands = | 73 | 73 | {toxinidir}/scripts/run_regression.sh | 74 | 74 | deps = | 75 | 75 | unittest2 | 76 | | - protobuf==3.0.0-alpha1 | | 76 | + protobuf==3.0.0-alpha-1 | 77 | 77 |
| 78 | 78 | [testenv:regression3] | 79 | 79 | basepython = | @@ -82,4 +82,4 @@ commands = | 82 | 82 | {toxinidir}/scripts/run_regression.sh | 83 | 83 | deps = | 84 | 84 | unittest2 | 85 | | - protobuf==3.0.0-alpha1 | | 85 | + protobuf==3.0.0-alpha-1 |
|