Skip to content

Commit f2cf463

Browse files
committed
- Fix obsoleted lint errors from updated pylint.
- Fix busted lint from auto-generated files. - Remove obsolete files. - Update stone.
1 parent 7249387 commit f2cf463

File tree

11 files changed

+21
-1345
lines changed

11 files changed

+21
-1345
lines changed

dropbox/babel_serializers.py

-773
This file was deleted.

dropbox/babel_validators.py

-562
This file was deleted.

dropbox/base.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
# -*- coding: utf-8 -*-
12
# Auto-generated by Stone, do not modify.
3+
# flake8: noqa
4+
# pylint: skip-file
25

36
from abc import ABCMeta, abstractmethod
47
import warnings

dropbox/base_team.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
# -*- coding: utf-8 -*-
12
# Auto-generated by Stone, do not modify.
3+
# flake8: noqa
4+
# pylint: skip-file
25

36
from abc import ABCMeta, abstractmethod
47
import warnings

dropbox/dropbox.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
'create_session',
55
]
66

7-
__version__ = '7.3.0'
7+
# This should always be 0.0.0 in master. Only update this after tagging
8+
# before release.
9+
__version__ = '0.0.0'
810

911
import contextlib
1012
import json
@@ -429,7 +431,7 @@ def request_json_string(self,
429431
if r.headers.get('content-type') == 'application/json':
430432
err = stone_serializers.json_compat_obj_decode(
431433
RateLimitError_validator, r.json()['error'])
432-
retry_after = err.retry_after # pylint: disable=no-member
434+
retry_after = err.retry_after
433435
else:
434436
retry_after_str = r.headers.get('retry-after')
435437
if retry_after_str is not None:

dropbox/oauth.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,12 @@ def __init__(self, consumer_key, consumer_secret, locale=None):
207207
error messages; this setting tells the server which locale to use.
208208
By default, the server uses "en_US".
209209
"""
210-
super(DropboxOAuth2FlowNoRedirect, self).__init__(consumer_key,
211-
consumer_secret,
212-
locale)
210+
# pylint: disable=useless-super-delegation
211+
super(DropboxOAuth2FlowNoRedirect, self).__init__(
212+
consumer_key,
213+
consumer_secret,
214+
locale,
215+
)
213216

214217
def start(self):
215218
"""

dropbox/rest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def request(self, method, url, post_params=None, body=None, headers=None, raw_re
209209

210210
# Handle StringIO/BytesIO instances, because urllib3 doesn't.
211211
if hasattr(body, 'getvalue'):
212-
body = body.getvalue() # pylint: disable=no-member
212+
body = body.getvalue()
213213

214214
# Reject any headers containing newlines; the error from the server isn't pretty.
215215
for key, value in headers.items():

dropbox/session.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# TODO(kelkabany): We probably only want to instantiate this once so that even
1414
# if multiple Dropbox objects are instantiated, they all share the same pool.
1515
class _SSLAdapter(HTTPAdapter):
16-
def init_poolmanager(self, connections, maxsize, block=False):
16+
def init_poolmanager(self, connections, maxsize, block=False): # noqa: E501; pylint: disable=arguments-differ
1717
self.poolmanager = PoolManager(num_pools=connections,
1818
maxsize=maxsize,
1919
block=block,

example/back-up-and-restore/backup-and-restore-example.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def restore(rev=None):
5858
def select_revision():
5959
# Get the revisions for a file (and sort by the datetime object, "server_modified")
6060
print("Finding available revisions on Dropbox...")
61-
entries = dbx.files_list_revisions(BACKUPPATH, limit=30).entries # pylint: disable=no-member
61+
entries = dbx.files_list_revisions(BACKUPPATH, limit=30).entries
6262
revisions = sorted(entries, key=lambda entry: entry.server_modified)
6363

6464
for revision in revisions:

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pypy = lint
1010
3.3 = lint
1111
3.4 = lint
1212
3.5 = lint
13-
3.6 = check # add lint back once pylint > 1.6.5 is released; see <https://github.com/PyCQA/pylint/issues/1241>
13+
3.6 = check, lint
1414
pypy3 = lint
1515

1616

0 commit comments

Comments
 (0)