Skip to content

Commit cb149fa

Browse files
mbogosianposita
authored andcommitted
Clean up repo
- Fix test runners. - Get linters to pass. - Prep for running linters via TravisCI. - Remove indicated support for Python 2.6.
1 parent de34ca3 commit cb149fa

38 files changed

+403
-252
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
__pycache__/
22
.cache/
3+
.eggs/
34
*.egg
45
*.egg-info/
56
*.pyc

.gitmodules

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[submodule "stone"]
22
path = stone
3-
url = https://github.com:dropbox/stone.git
3+
url = https://github.com/dropbox/stone.git
44
[submodule "spec"]
55
path = spec
6-
url = https://github.com:dropbox/dropbox-api-spec.git
6+
url = https://github.com/dropbox/dropbox-api-spec.git

.pylintrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[MESSAGES CONTROL]
2+
disable=C,R,fixme,locally-disabled,protected-access,useless-else-on-loop
3+
enable=useless-suppression
4+
5+
[REPORTS]
6+
reports=n

.travis.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
language: python
2+
3+
python:
4+
- "2.7"
5+
- pypy
6+
- "3.3"
7+
- "3.4"
8+
- "3.5"
9+
- pypy3
10+
11+
install:
12+
- pip install tox-travis
13+
14+
matrix:
15+
allow_failures:
16+
# PyPy 3k probably won't work until it acquires compatibility with
17+
# >= 3.4
18+
- python: pypy3
19+
20+
script:
21+
- tox

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2015-2016 Dropbox Inc., http://www.dropbox.com/
1+
Copyright (c) 2015-2017 Dropbox Inc., http://www.dropbox.com/
22

33
Permission is hereby granted, free of charge, to any person obtaining
44
a copy of this software and associated documentation files (the

MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
include ez_setup.py
22
include LICENSE
33
include *.rst
4+
include test/requirements.txt

README.rst

+29-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,34 @@
11
Dropbox for Python
22
==================
33

4+
.. image:: https://travis-ci.org/dropbox/dropbox-sdk-python.svg?branch=master
5+
:target: https://travis-ci.org/dropbox/dropbox-sdk-python
6+
7+
.. image:: https://readthedocs.org/projects/dropbox-sdk-python/badge/?version=latest
8+
:target: https://dropbox-sdk-python.readthedocs.org/en/latest/
9+
:alt: [Latest Documentation]
10+
11+
.. image:: https://img.shields.io/pypi/v/dropbox.svg
12+
:target: https://pypi.python.org/pypi/dropbox
13+
:alt: [Latest Release Version]
14+
15+
.. image:: https://img.shields.io/pypi/l/dropbox.svg
16+
:target: http://opensource.org/licenses/MIT
17+
:alt: [Latest Release License]
18+
19+
.. image:: https://img.shields.io/pypi/pyversions/dropbox.svg
20+
:target: https://pypi.python.org/pypi/dropbox
21+
:alt: [Latest Release Supported Python Versions]
22+
23+
.. image:: https://img.shields.io/pypi/implementation/dropbox.svg
24+
:target: https://pypi.python.org/pypi/dropbox
25+
:alt: [Latest Release Supported Python Implementations]
26+
27+
.. image:: https://img.shields.io/pypi/status/dropbox.svg
28+
:target: https://pypi.python.org/pypi/dropbox
29+
:alt: [Latest Release Development Stage]
30+
31+
432
A Python SDK for integrating with the Dropbox API v2. Compatible with Python
533
2.7 and 3.4+. Documentation is available on `Read the Docs
634
<http://dropbox-sdk-python.readthedocs.org/>`_.
@@ -56,8 +84,7 @@ Documentation
5684

5785
Documentation can be compiled by running ``make html`` from the ``docs``
5886
folder. After compilation, open ``docs/_build/html/index.html``. Alternatively,
59-
you can read a hosted version from `Read the Docs
60-
<http://dropbox-sdk-python.readthedocs.org/>`_.
87+
you can read a hosted version from `Read the Docs`_.
6188

6289
Updating API specification
6390
--------------------------

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
# General information about the project.
5656
project = u'Dropbox for Python'
57-
copyright = u'2017, Dropbox, Inc.'
57+
copyright = u'2015-2017, Dropbox, Inc.'
5858

5959
# The version info for the project you're documenting, acts as replacement for
6060
# |version| and |release|, also used in various other places throughout the

dropbox/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import absolute_import
22

3-
from .dropbox import __version__, Dropbox, DropboxTeam, create_session
4-
from .oauth import DropboxOAuth2Flow, DropboxOAuth2FlowNoRedirect
3+
from .dropbox import __version__, Dropbox, DropboxTeam, create_session # noqa: F401
4+
from .oauth import DropboxOAuth2Flow, DropboxOAuth2FlowNoRedirect # noqa: F401
55

66
# Compatibility with the deprecated v1 client.
7-
from . import client, rest, session
7+
from . import client, rest, session # noqa: F401

dropbox/async.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# -*- coding: utf-8 -*-
22
# Auto-generated by Stone, do not modify.
3+
# flake8: noqa
4+
# pylint: skip-file
35
try:
46
from . import stone_validators as bv
57
from . import stone_base as bb
@@ -305,4 +307,3 @@ def __repr__(self):
305307

306308
ROUTES = {
307309
}
308-

dropbox/auth.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# -*- coding: utf-8 -*-
22
# Auto-generated by Stone, do not modify.
3+
# flake8: noqa
4+
# pylint: skip-file
35
try:
46
from . import stone_validators as bv
57
from . import stone_base as bb
@@ -718,4 +720,3 @@ def __repr__(self):
718720
'token/from_oauth1': token_from_oauth1,
719721
'token/revoke': token_revoke,
720722
}
721-

dropbox/babel_serializers.py

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
EDITING THIS FILE? Please modify the version in the babelapi repo,
1212
"""
1313

14+
from __future__ import absolute_import
15+
1416
import base64
1517
import collections
1618
import datetime

dropbox/babel_validators.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
if six.PY3:
2323
_binary_types = (bytes, memoryview)
2424
else:
25-
_binary_types = (bytes, buffer)
25+
_binary_types = (bytes, buffer) # noqa: E501,F821; pylint: disable=undefined-variable,useless-suppression
2626

2727

2828
class ValidationError(Exception):
@@ -103,7 +103,7 @@ def get_default(self):
103103
raise AssertionError('No default available.')
104104

105105

106-
class Primitive(Validator):
106+
class Primitive(Validator): # pylint: disable=abstract-method
107107
"""A basic type that is defined by Babel."""
108108
pass
109109

@@ -346,7 +346,7 @@ class Timestamp(Primitive):
346346
since a native Python datetime object is preferred. The format, however,
347347
can and should be used by serializers."""
348348

349-
def __init__(self, format):
349+
def __init__(self, format): # pylint: disable=redefined-builtin
350350
"""format must be composed of format codes that the C standard (1989)
351351
supports, most notably in its strftime() function."""
352352
assert isinstance(format, six.text_type), 'format must be a string'
@@ -363,7 +363,7 @@ def validate(self, val):
363363
return val
364364

365365

366-
class Composite(Validator):
366+
class Composite(Validator): # pylint: disable=abstract-method
367367
"""Validator for a type that builds on other primitive and composite
368368
types."""
369369
pass

dropbox/base.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Auto-generated by Stone, do not modify.
2+
# flake8: noqa
3+
# pylint: skip-file
24

35
from abc import ABCMeta, abstractmethod
46
import warnings
@@ -3205,4 +3207,3 @@ def users_get_space_usage(self):
32053207
None,
32063208
)
32073209
return r
3208-

dropbox/base_team.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Auto-generated by Stone, do not modify.
2+
# flake8: noqa
3+
# pylint: skip-file
24

35
from abc import ABCMeta, abstractmethod
46
import warnings
@@ -1374,4 +1376,3 @@ def team_team_folder_rename(self,
13741376
None,
13751377
)
13761378
return r
1377-

0 commit comments

Comments
 (0)