Skip to content

Commit 0f6aa66

Browse files
author
Will Myers
authored
Add flake8 to tests; move /test directory (#18)
* Add flake8 to tests; move /test directory * Update CHANGELOG * Update flake8
1 parent f1475ef commit 0f6aa66

26 files changed

+73
-35
lines changed

.flake8

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[flake8]
2+
ignore = F821
3+
exclude = build

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ python:
66
- "3.3"
77
- "3.4"
88
- "3.5"
9+
install:
10+
- "pip install flake8==3.3.0"
911
script: python setup.py test

CHANGELOG.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1+
Current Version
2+
- Add flake8 to test suite
3+
- Move /test directory inside package
4+
- Migrate relative imports to package absolute
5+
16
2.2.0 January 6, 2016
27
- Add merchants resource
38

49
2.1.0 January 4, 2017
510
- Add utils#is_webhook_authentic function
611

712
2.0.0 October 13, 2016
8-
- Added accounts resource
9-
- Breaking changes to pybutton.Response class
13+
- Add accounts resource
14+
- Add breaking changes to pybutton.Response class
1015

1116
1.1.0 October 4, 2016
12-
- Added config options: hostname, port, secure, timeout
17+
- Add config options: hostname, port, secure, timeout
1318

1419
1.0.2 August 11, 2016
1520
- Initial Release

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,8 @@ Contributing
332332
- Building the wheel: ``python setup.py bdist_wheel --universal``
333333
- Building the sdist: ``python setup.py sdist``
334334
- Installing locally: ``python setup.py install``
335-
- Running tests: ``python setup.py test``
336-
- Running lint: ``flake8``
335+
- Running tests: ``python setup.py test`` (you'll need to `pip install flake8==3.3.0`)
336+
- Running lint directly: ``flake8 pybutton``
337337

338338
.. |Build Status| image:: https://travis-ci.org/button/button-client-python.svg?branch=master
339339
:target: https://travis-ci.org/button/button-client-python

pybutton/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
from __future__ import print_function
44
from __future__ import unicode_literals
55

6-
from .client import Client
7-
from .error import ButtonClientError
8-
from .version import VERSION
6+
from pybutton.client import Client
7+
from pybutton.error import ButtonClientError
8+
from pybutton.version import VERSION
99

1010
__all__ = [Client, ButtonClientError, VERSION]

pybutton/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
from __future__ import print_function
44
from __future__ import unicode_literals
55

6-
from .resources import Accounts
7-
from .resources import Merchants
8-
from .resources import Orders
9-
from .error import ButtonClientError
6+
from pybutton.resources import Accounts
7+
from pybutton.resources import Merchants
8+
from pybutton.resources import Orders
9+
from pybutton.error import ButtonClientError
1010

1111

1212
class Client(object):

pybutton/request.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import sys
77
import json
88

9-
from .error import ButtonClientError
9+
from pybutton.error import ButtonClientError
1010

1111
# `pybutton.request` will expose 4 attributes, all specific to the major
1212
# version of the interpreter:
@@ -152,6 +152,7 @@ def query_dict(url):
152152
query_string = url_components.query
153153
return parse_qs(query_string)
154154

155+
155156
__all__ = [
156157
Request,
157158
urlopen,

pybutton/resources/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
from __future__ import print_function
44
from __future__ import unicode_literals
55

6-
from .accounts import Accounts
7-
from .merchants import Merchants
8-
from .orders import Orders
6+
from pybutton.resources.accounts import Accounts
7+
from pybutton.resources.merchants import Merchants
8+
from pybutton.resources.orders import Orders
99

1010
__all__ = [
11-
Accounts,
12-
Merchants,
13-
Orders
11+
Accounts,
12+
Merchants,
13+
Orders
1414
]

pybutton/resources/accounts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from __future__ import print_function
44
from __future__ import unicode_literals
55

6-
from .resource import Resource
6+
from pybutton.resources.resource import Resource
77

88

99
class Accounts(Resource):

pybutton/resources/merchants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from __future__ import print_function
44
from __future__ import unicode_literals
55

6-
from .resource import Resource
6+
from pybutton.resources.resource import Resource
77

88

99
class Merchants(Resource):

0 commit comments

Comments
 (0)