Skip to content

Commit 294b0f5

Browse files
committed
pylint: update to 1.8.1
1 parent 263bae8 commit 294b0f5

File tree

9 files changed

+15
-14
lines changed

9 files changed

+15
-14
lines changed

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Paver==1.2.4
33
Tempita==0.5.2
44
epydoc==3.0.1
55
bpython==0.16
6-
pylint==1.5.6
6+
pylint==1.8.1
77
tox==2.9.1
88
mock==2.0.0
99
twine==1.9.1

src/pyrobase/bencode.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# pylint: disable=too-few-public-methods
2+
# pylint: disable=too-few-public-methods,invalid-name
33
""" Bencode support.
44
55
Copyright (c) 2009-2017 The PyroScope Project <[email protected]>
@@ -87,7 +87,7 @@ def decode(self, check_trailer=False): # pylint: disable=I0011,R0912
8787
elif kind == 'l':
8888
# List
8989
self.offset += 1
90-
obj = [] # pylint: disable=redefined-variable-type
90+
obj = []
9191
while self.data[self.offset:self.offset+1] != 'e':
9292
obj.append(self.decode())
9393
self.offset += 1

src/pyrobase/fmt.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- coding: utf-8 -*-
2+
# pylint: disable=invalid-name,no-else-return
23
""" Data Formatting.
34
45
Copyright (c) 2009, 2011 The PyroScope Project <[email protected]>

src/pyrobase/io/xmlrpc2scgi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# pylint: disable=too-few-public-methods
2+
# pylint: disable=too-few-public-methods,no-else-return
33
""" XMLRPC via SCGI client proxy over various transports.
44
55
Copyright (c) 2011 The PyroScope Project <[email protected]>
@@ -162,7 +162,7 @@ def transport_from_url(url):
162162
"""
163163
if '/' not in url and ':' in url and url.rsplit(':')[-1].isdigit():
164164
url = 'scgi://' + url
165-
url = urlparse.urlsplit(url, "scgi", allow_fragments=False)
165+
url = urlparse.urlsplit(url, scheme="scgi", allow_fragments=False) # pylint: disable=redundant-keyword-arg
166166

167167
try:
168168
transport = TRANSPORTS[url.scheme.lower()]

src/pyrobase/paver/quality.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@
3636
@support.task_requires("pylint>=1.4")
3737
def lint():
3838
"report pylint results"
39-
from pylint import lint as linter # pylint: disable=W0404
40-
4139
# report according to file extension
4240
report_formats = {
4341
".html": "html",

src/pyrobase/paver/support.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# pylint: disable=
2+
# pylint: disable=no-else-return
33
""" Paver Task Implementation Helpers.
44
55
Copyright (c) 2011 The PyroScope Project <[email protected]>
@@ -25,7 +25,7 @@
2525
from pyrobase import iterutil
2626

2727

28-
def venv_bin(name=None):
28+
def venv_bin(name=None): # pylint: disable=inconsistent-return-statements
2929
""" Get the directory for virtualenv stubs, or a full executable path
3030
if C{name} is provided.
3131
"""

src/pyrobase/templating.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def preparse(template_text, lookup=None):
9191
template = tempita.Template(template_text, name=template_path)
9292
template.__engine__ = "tempita"
9393
else:
94-
template = InterpolationTemplate(template_text) # pylint: disable=redefined-variable-type
94+
template = InterpolationTemplate(template_text)
9595

9696
template.__file__ = template_path
9797

src/pyrobase/testing.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
# You should have received a copy of the GNU General Public License along
1717
# with this program; if not, write to the Free Software Foundation, Inc.,
1818
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19+
from __future__ import absolute_import, print_function, unicode_literals
20+
1921
import errno
2022
from contextlib import contextmanager
2123

@@ -71,5 +73,5 @@ def mock_open(name, mode=None, buffering=None): # pylint: disable=W0613
7173
else:
7274
return DictItemIO(fakefiles, name)
7375

74-
with mock.patch("__builtin__.open" if PY2 else "builtins.open", mock_open) as mock_file:
76+
with mock.patch("__builtin__.open" if PY2 else "builtins.open", mock_open):
7577
yield fakefiles

src/pyrobase/webservice/imgur.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
raise ImportError("Please 'pip install \"pyrobase[imgur]\"' (%s)" % (_exc,))
3636
from imgurpython.helpers.error import ImgurClientError, ImgurClientRateLimitError
3737

38-
from pyrobase import parts, pyutil, logutil, fmt
39-
from pyrobase.io import http
38+
from pyrobase import parts, pyutil
4039

4140
json = pyutil.require_json()
4241
LOG = logging.getLogger(__name__)
@@ -98,7 +97,8 @@ def upload(self, image, name=None):
9897
# Upload image
9998
# XXX "name", name or hashlib.md5(str(image)).hexdigest()),
10099
client = ImgurClient(self.client_id, self.client_secret)
101-
result = (client.upload_from_url if image_type == 'url' else client.upload_from_path)(image_data) # XXX config=None, anon=True)
100+
result = (client.upload_from_url if image_type == 'url'
101+
else client.upload_from_path)(image_data) # XXX config=None, anon=True)
102102

103103
if result['link'].startswith('http:'):
104104
result['link'] = 'https:' + result['link'][5:]

0 commit comments

Comments
 (0)