Skip to content

Commit 4cf536e

Browse files
committed
Don't use pylint disable and update alpha PyPI info.
1 parent fa73670 commit 4cf536e

File tree

5 files changed

+24
-13
lines changed

5 files changed

+24
-13
lines changed

gcloud/credentials.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import calendar
1919
import datetime
2020
import six
21-
from six.moves.urllib.parse import urlencode # pylint: disable=F0401
2221

2322
from Crypto.Hash import SHA256
2423
from Crypto.PublicKey import RSA
@@ -29,6 +28,9 @@
2928
import pytz
3029

3130

31+
URLENCODE = six.moves.urllib.parse.urlencode
32+
33+
3234
def get_credentials():
3335
"""Gets credentials implicitly from the current environment.
3436
@@ -260,4 +262,4 @@ def generate_signed_url(credentials, resource, expiration,
260262
# Return the built URL.
261263
return '{endpoint}{resource}?{querystring}'.format(
262264
endpoint=api_access_endpoint, resource=resource,
263-
querystring=urlencode(query_params))
265+
querystring=URLENCODE(query_params))

gcloud/datastore/_implicit_environ.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@
2020

2121
import socket
2222

23-
from six.moves.http_client import HTTPConnection # pylint: disable=F0401
23+
import six
2424

2525
try:
2626
from google.appengine.api import app_identity
2727
except ImportError:
2828
app_identity = None
2929

3030

31+
HTTPConnection = six.moves.http_client.HTTPConnection
32+
33+
3134
DATASET_ID = None
3235
"""Module global to allow persistent implied dataset ID from enviroment."""
3336

gcloud/storage/blob.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@
2020
import time
2121
import datetime
2222
from io import BytesIO
23-
2423
import six
25-
from six.moves.urllib.parse import quote # pylint: disable=F0401
24+
import urllib
2625

2726
from _gcloud_vendor.apitools.base.py import http_wrapper
2827
from _gcloud_vendor.apitools.base.py import transfer
@@ -33,6 +32,10 @@
3332
from gcloud.storage.acl import ObjectACL
3433

3534

35+
try:
36+
quote = urllib.quote
37+
except AttributeError: # pragma: NO COVER Py3K
38+
quote = urllib.parse.quote
3639
_API_ACCESS_ENDPOINT = 'https://storage.googleapis.com'
3740

3841

gcloud/storage/connection.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import json
1818

19-
from six.moves.urllib.parse import urlencode # pylint: disable=F0401
19+
import six
2020

2121
from gcloud.connection import Connection as _Base
2222
from gcloud.exceptions import make_exception
@@ -25,6 +25,9 @@
2525
from gcloud.storage.iterator import Iterator
2626

2727

28+
URLENCODE = six.moves.urllib.parse.urlencode
29+
30+
2831
class Connection(_Base):
2932
"""A connection to Google Cloud Storage via the JSON REST API.
3033
@@ -127,7 +130,7 @@ def build_api_url(self, path, query_params=None, api_base_url=None,
127130

128131
query_params = query_params or {}
129132
query_params.update({'project': self.project})
130-
url += '?' + urlencode(query_params)
133+
url += '?' + URLENCODE(query_params)
131134

132135
return url
133136

tox.ini

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ commands =
88
deps =
99
nose
1010
unittest2
11-
protobuf==3.0.0-alpha1
11+
protobuf==3.0.0-alpha-1
1212

1313
[testenv]
1414
install_command =
@@ -18,7 +18,7 @@ commands =
1818
deps =
1919
nose
2020
unittest2
21-
protobuf==3.0.0-alpha1
21+
protobuf==3.0.0-alpha-1
2222

2323
[testenv:cover]
2424
basepython =
@@ -28,7 +28,7 @@ commands =
2828
deps =
2929
nose
3030
unittest2
31-
protobuf==3.0.0-alpha1
31+
protobuf==3.0.0-alpha-1
3232
coverage
3333
nosexcover
3434

@@ -64,7 +64,7 @@ deps =
6464
pep8
6565
pylint
6666
unittest2
67-
protobuf==3.0.0-alpha1
67+
protobuf==3.0.0-alpha-1
6868

6969
[testenv:regression]
7070
basepython =
@@ -73,7 +73,7 @@ commands =
7373
{toxinidir}/scripts/run_regression.sh
7474
deps =
7575
unittest2
76-
protobuf==3.0.0-alpha1
76+
protobuf==3.0.0-alpha-1
7777

7878
[testenv:regression3]
7979
basepython =
@@ -82,4 +82,4 @@ commands =
8282
{toxinidir}/scripts/run_regression.sh
8383
deps =
8484
unittest2
85-
protobuf==3.0.0-alpha1
85+
protobuf==3.0.0-alpha-1

0 commit comments

Comments
 (0)