From b963534837a15ebde27f86cb5cdc587e59b21cb7 Mon Sep 17 00:00:00 2001 From: kevinli7 Date: Tue, 17 Apr 2018 11:25:49 -0400 Subject: [PATCH] Fix lint errors in apitools and pin pycodestyle to version 2.4.0. --- apitools/base/protorpclite/test_util.py | 2 +- apitools/base/protorpclite/util.py | 2 +- apitools/base/py/batch.py | 2 +- setup.cfg | 2 +- tox.ini | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apitools/base/protorpclite/test_util.py b/apitools/base/protorpclite/test_util.py index 90a7aa1c..43345fc4 100644 --- a/apitools/base/protorpclite/test_util.py +++ b/apitools/base/protorpclite/test_util.py @@ -88,7 +88,7 @@ def assertHeaderSame(self, header1, header2): self.assertEqual(params1, params2) def assertIterEqual(self, iter1, iter2): - """Check that two iterators or iterables are equal independent of order. + """Check two iterators or iterables are equal independent of order. Similar to Python 2.7 assertItemsEqual. Named differently in order to avoid potential conflict. diff --git a/apitools/base/protorpclite/util.py b/apitools/base/protorpclite/util.py index 7a7797db..b0ba240d 100644 --- a/apitools/base/protorpclite/util.py +++ b/apitools/base/protorpclite/util.py @@ -53,7 +53,7 @@ class Error(Exception): def positional(max_positional_args): - """A decorator to declare that only the first N arguments may be positional. + """A decorator that declares only the first N arguments may be positional. This decorator makes it easy to support Python 3 style keyword-only parameters. For example, in Python 3 it is possible to write: diff --git a/apitools/base/py/batch.py b/apitools/base/py/batch.py index f925ccfe..1b3f8d88 100644 --- a/apitools/base/py/batch.py +++ b/apitools/base/py/batch.py @@ -123,7 +123,7 @@ def terminal_state(self): return response_code not in self.__retryable_codes def HandleResponse(self, http_response, exception): - """Handles an incoming http response to the request in http_request. + """Handles incoming http response to the request in http_request. This is intended to be used as a callback function for BatchHttpRequest.Add. diff --git a/setup.cfg b/setup.cfg index 7390cbba..a5ba8ba5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,3 @@ [pycodestyle] count = False -ignore = E722,E741 +ignore = E722,E741,W504 diff --git a/tox.ini b/tox.ini index dfee48bc..aaa22e05 100644 --- a/tox.ini +++ b/tox.ini @@ -26,7 +26,7 @@ commands = pip install six google-apitools pycodestyle apitools deps = - pycodestyle + pycodestyle==2.4.0 pylint unittest2