Skip to content

Commit

Permalink
Clean up repo
Browse files Browse the repository at this point in the history
- Fix test runners.
- Get linters to pass.
- Prep for running linters via TravisCI.
- Remove indicated support for Python 2.6.
  • Loading branch information
mbogosian authored and posita committed Mar 5, 2017
1 parent de34ca3 commit cb149fa
Show file tree
Hide file tree
Showing 38 changed files with 403 additions and 252 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
__pycache__/
.cache/
.eggs/
*.egg
*.egg-info/
*.pyc
Expand Down
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "stone"]
path = stone
url = https://github.com:dropbox/stone.git
url = https://github.com/dropbox/stone.git
[submodule "spec"]
path = spec
url = https://github.com:dropbox/dropbox-api-spec.git
url = https://github.com/dropbox/dropbox-api-spec.git
6 changes: 6 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[MESSAGES CONTROL]
disable=C,R,fixme,locally-disabled,protected-access,useless-else-on-loop
enable=useless-suppression

[REPORTS]
reports=n
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
language: python

python:
- "2.7"
- pypy
- "3.3"
- "3.4"
- "3.5"
- pypy3

install:
- pip install tox-travis

matrix:
allow_failures:
# PyPy 3k probably won't work until it acquires compatibility with
# >= 3.4
- python: pypy3

script:
- tox
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015-2016 Dropbox Inc., http://www.dropbox.com/
Copyright (c) 2015-2017 Dropbox Inc., http://www.dropbox.com/

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include ez_setup.py
include LICENSE
include *.rst
include test/requirements.txt
31 changes: 29 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
Dropbox for Python
==================

.. image:: https://travis-ci.org/dropbox/dropbox-sdk-python.svg?branch=master
:target: https://travis-ci.org/dropbox/dropbox-sdk-python

.. image:: https://readthedocs.org/projects/dropbox-sdk-python/badge/?version=latest
:target: https://dropbox-sdk-python.readthedocs.org/en/latest/
:alt: [Latest Documentation]

.. image:: https://img.shields.io/pypi/v/dropbox.svg
:target: https://pypi.python.org/pypi/dropbox
:alt: [Latest Release Version]

.. image:: https://img.shields.io/pypi/l/dropbox.svg
:target: http://opensource.org/licenses/MIT
:alt: [Latest Release License]

.. image:: https://img.shields.io/pypi/pyversions/dropbox.svg
:target: https://pypi.python.org/pypi/dropbox
:alt: [Latest Release Supported Python Versions]

.. image:: https://img.shields.io/pypi/implementation/dropbox.svg
:target: https://pypi.python.org/pypi/dropbox
:alt: [Latest Release Supported Python Implementations]

.. image:: https://img.shields.io/pypi/status/dropbox.svg
:target: https://pypi.python.org/pypi/dropbox
:alt: [Latest Release Development Stage]


A Python SDK for integrating with the Dropbox API v2. Compatible with Python
2.7 and 3.4+. Documentation is available on `Read the Docs
<http://dropbox-sdk-python.readthedocs.org/>`_.
Expand Down Expand Up @@ -56,8 +84,7 @@ Documentation

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

Updating API specification
--------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

# General information about the project.
project = u'Dropbox for Python'
copyright = u'2017, Dropbox, Inc.'
copyright = u'2015-2017, Dropbox, Inc.'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
6 changes: 3 additions & 3 deletions dropbox/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import absolute_import

from .dropbox import __version__, Dropbox, DropboxTeam, create_session
from .oauth import DropboxOAuth2Flow, DropboxOAuth2FlowNoRedirect
from .dropbox import __version__, Dropbox, DropboxTeam, create_session # noqa: F401
from .oauth import DropboxOAuth2Flow, DropboxOAuth2FlowNoRedirect # noqa: F401

# Compatibility with the deprecated v1 client.
from . import client, rest, session
from . import client, rest, session # noqa: F401
3 changes: 2 additions & 1 deletion dropbox/async.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-
# Auto-generated by Stone, do not modify.
# flake8: noqa
# pylint: skip-file
try:
from . import stone_validators as bv
from . import stone_base as bb
Expand Down Expand Up @@ -305,4 +307,3 @@ def __repr__(self):

ROUTES = {
}

3 changes: 2 additions & 1 deletion dropbox/auth.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-
# Auto-generated by Stone, do not modify.
# flake8: noqa
# pylint: skip-file
try:
from . import stone_validators as bv
from . import stone_base as bb
Expand Down Expand Up @@ -718,4 +720,3 @@ def __repr__(self):
'token/from_oauth1': token_from_oauth1,
'token/revoke': token_revoke,
}

2 changes: 2 additions & 0 deletions dropbox/babel_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
EDITING THIS FILE? Please modify the version in the babelapi repo,
"""

from __future__ import absolute_import

import base64
import collections
import datetime
Expand Down
8 changes: 4 additions & 4 deletions dropbox/babel_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
if six.PY3:
_binary_types = (bytes, memoryview)
else:
_binary_types = (bytes, buffer)
_binary_types = (bytes, buffer) # noqa: E501,F821; pylint: disable=undefined-variable,useless-suppression


class ValidationError(Exception):
Expand Down Expand Up @@ -103,7 +103,7 @@ def get_default(self):
raise AssertionError('No default available.')


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

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

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


class Composite(Validator):
class Composite(Validator): # pylint: disable=abstract-method
"""Validator for a type that builds on other primitive and composite
types."""
pass
Expand Down
3 changes: 2 additions & 1 deletion dropbox/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Auto-generated by Stone, do not modify.
# flake8: noqa
# pylint: skip-file

from abc import ABCMeta, abstractmethod
import warnings
Expand Down Expand Up @@ -3205,4 +3207,3 @@ def users_get_space_usage(self):
None,
)
return r

3 changes: 2 additions & 1 deletion dropbox/base_team.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Auto-generated by Stone, do not modify.
# flake8: noqa
# pylint: skip-file

from abc import ABCMeta, abstractmethod
import warnings
Expand Down Expand Up @@ -1374,4 +1376,3 @@ def team_team_folder_rename(self,
None,
)
return r

Loading

0 comments on commit cb149fa

Please sign in to comment.