Skip to content

Commit

Permalink
Don't use pylint disable and update alpha PyPI info.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhermes committed Feb 4, 2015
1 parent fa73670 commit 4cf536e
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 13 deletions.
6 changes: 4 additions & 2 deletions gcloud/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import calendar
import datetime
import six
from six.moves.urllib.parse import urlencode # pylint: disable=F0401

from Crypto.Hash import SHA256
from Crypto.PublicKey import RSA
Expand All @@ -29,6 +28,9 @@
import pytz


URLENCODE = six.moves.urllib.parse.urlencode


def get_credentials():
"""Gets credentials implicitly from the current environment.
Expand Down Expand Up @@ -260,4 +262,4 @@ def generate_signed_url(credentials, resource, expiration,
# Return the built URL.
return '{endpoint}{resource}?{querystring}'.format(
endpoint=api_access_endpoint, resource=resource,
querystring=urlencode(query_params))
querystring=URLENCODE(query_params))
5 changes: 4 additions & 1 deletion gcloud/datastore/_implicit_environ.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@

import socket

from six.moves.http_client import HTTPConnection # pylint: disable=F0401
import six

try:
from google.appengine.api import app_identity
except ImportError:
app_identity = None


HTTPConnection = six.moves.http_client.HTTPConnection


DATASET_ID = None
"""Module global to allow persistent implied dataset ID from enviroment."""

Expand Down
7 changes: 5 additions & 2 deletions gcloud/storage/blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
import time
import datetime
from io import BytesIO

import six
from six.moves.urllib.parse import quote # pylint: disable=F0401
import urllib

from _gcloud_vendor.apitools.base.py import http_wrapper
from _gcloud_vendor.apitools.base.py import transfer
Expand All @@ -33,6 +32,10 @@
from gcloud.storage.acl import ObjectACL


try:
quote = urllib.quote

This comment has been minimized.

Copy link
@dhermes

dhermes Feb 4, 2015

Author Owner

Using six.moves..urllib.parse.quote caused pylint to complain about using safe as a positional and a keyword argument. Very frustrating, but workable.

except AttributeError: # pragma: NO COVER Py3K
quote = urllib.parse.quote
_API_ACCESS_ENDPOINT = 'https://storage.googleapis.com'


Expand Down
7 changes: 5 additions & 2 deletions gcloud/storage/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import json

from six.moves.urllib.parse import urlencode # pylint: disable=F0401
import six

from gcloud.connection import Connection as _Base
from gcloud.exceptions import make_exception
Expand All @@ -25,6 +25,9 @@
from gcloud.storage.iterator import Iterator


URLENCODE = six.moves.urllib.parse.urlencode


class Connection(_Base):
"""A connection to Google Cloud Storage via the JSON REST API.
Expand Down Expand Up @@ -127,7 +130,7 @@ def build_api_url(self, path, query_params=None, api_base_url=None,

query_params = query_params or {}
query_params.update({'project': self.project})
url += '?' + urlencode(query_params)
url += '?' + URLENCODE(query_params)

return url

Expand Down
12 changes: 6 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ commands =
deps =
nose
unittest2
protobuf==3.0.0-alpha1
protobuf==3.0.0-alpha-1

[testenv]
install_command =
Expand All @@ -18,7 +18,7 @@ commands =
deps =
nose
unittest2
protobuf==3.0.0-alpha1
protobuf==3.0.0-alpha-1

[testenv:cover]
basepython =
Expand All @@ -28,7 +28,7 @@ commands =
deps =
nose
unittest2
protobuf==3.0.0-alpha1
protobuf==3.0.0-alpha-1
coverage
nosexcover

Expand Down Expand Up @@ -64,7 +64,7 @@ deps =
pep8
pylint
unittest2
protobuf==3.0.0-alpha1
protobuf==3.0.0-alpha-1

[testenv:regression]
basepython =
Expand All @@ -73,7 +73,7 @@ commands =
{toxinidir}/scripts/run_regression.sh
deps =
unittest2
protobuf==3.0.0-alpha1
protobuf==3.0.0-alpha-1

[testenv:regression3]
basepython =
Expand All @@ -82,4 +82,4 @@ commands =
{toxinidir}/scripts/run_regression.sh
deps =
unittest2
protobuf==3.0.0-alpha1
protobuf==3.0.0-alpha-1

0 comments on commit 4cf536e

Please sign in to comment.