Skip to content

Commit

Permalink
- Fix obsoleted lint errors from updated pylint.
Browse files Browse the repository at this point in the history
- Fix busted lint from auto-generated files.
- Remove obsolete files.
- Update stone.
  • Loading branch information
mbogosian committed May 11, 2017
1 parent 7249387 commit f2cf463
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 1,345 deletions.
773 changes: 0 additions & 773 deletions dropbox/babel_serializers.py

This file was deleted.

562 changes: 0 additions & 562 deletions dropbox/babel_validators.py

This file was deleted.

3 changes: 3 additions & 0 deletions dropbox/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# -*- coding: utf-8 -*-
# Auto-generated by Stone, do not modify.
# flake8: noqa
# pylint: skip-file

from abc import ABCMeta, abstractmethod
import warnings
Expand Down
3 changes: 3 additions & 0 deletions dropbox/base_team.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# -*- coding: utf-8 -*-
# Auto-generated by Stone, do not modify.
# flake8: noqa
# pylint: skip-file

from abc import ABCMeta, abstractmethod
import warnings
Expand Down
6 changes: 4 additions & 2 deletions dropbox/dropbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
'create_session',
]

__version__ = '7.3.0'
# This should always be 0.0.0 in master. Only update this after tagging
# before release.
__version__ = '0.0.0'

import contextlib
import json
Expand Down Expand Up @@ -429,7 +431,7 @@ def request_json_string(self,
if r.headers.get('content-type') == 'application/json':
err = stone_serializers.json_compat_obj_decode(
RateLimitError_validator, r.json()['error'])
retry_after = err.retry_after # pylint: disable=no-member
retry_after = err.retry_after
else:
retry_after_str = r.headers.get('retry-after')
if retry_after_str is not None:
Expand Down
9 changes: 6 additions & 3 deletions dropbox/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,12 @@ def __init__(self, consumer_key, consumer_secret, locale=None):
error messages; this setting tells the server which locale to use.
By default, the server uses "en_US".
"""
super(DropboxOAuth2FlowNoRedirect, self).__init__(consumer_key,
consumer_secret,
locale)
# pylint: disable=useless-super-delegation
super(DropboxOAuth2FlowNoRedirect, self).__init__(
consumer_key,
consumer_secret,
locale,
)

def start(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion dropbox/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def request(self, method, url, post_params=None, body=None, headers=None, raw_re

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

# Reject any headers containing newlines; the error from the server isn't pretty.
for key, value in headers.items():
Expand Down
2 changes: 1 addition & 1 deletion dropbox/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# TODO(kelkabany): We probably only want to instantiate this once so that even
# if multiple Dropbox objects are instantiated, they all share the same pool.
class _SSLAdapter(HTTPAdapter):
def init_poolmanager(self, connections, maxsize, block=False):
def init_poolmanager(self, connections, maxsize, block=False): # noqa: E501; pylint: disable=arguments-differ
self.poolmanager = PoolManager(num_pools=connections,
maxsize=maxsize,
block=block,
Expand Down
2 changes: 1 addition & 1 deletion example/back-up-and-restore/backup-and-restore-example.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def restore(rev=None):
def select_revision():
# Get the revisions for a file (and sort by the datetime object, "server_modified")
print("Finding available revisions on Dropbox...")
entries = dbx.files_list_revisions(BACKUPPATH, limit=30).entries # pylint: disable=no-member
entries = dbx.files_list_revisions(BACKUPPATH, limit=30).entries
revisions = sorted(entries, key=lambda entry: entry.server_modified)

for revision in revisions:
Expand Down
2 changes: 1 addition & 1 deletion stone
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pypy = lint
3.3 = lint
3.4 = lint
3.5 = lint
3.6 = check # add lint back once pylint > 1.6.5 is released; see <https://github.com/PyCQA/pylint/issues/1241>
3.6 = check, lint
pypy3 = lint


Expand Down

0 comments on commit f2cf463

Please sign in to comment.