Skip to content

Commit 14f5641

Browse files
author
Will Myers
authored
Add HTTPResponseError to top-level import (#32)
* Add HTTPResponseError to top-level import * Add flake8 exceptions
1 parent 5ae9d66 commit 14f5641

File tree

5 files changed

+15
-30
lines changed

5 files changed

+15
-30
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Current Version
22
-
33

4+
2.6.1 June 5, 2018
5+
- Added `HTTPResponseError` to top-level import
6+
- Remove `__all__` imports: they never worked
7+
48
2.6.0 May 17, 2018
59
- Added `HTTPResponseError`
610

pybutton/__init__.py

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

6-
from pybutton.client import Client
7-
from pybutton.error import ButtonClientError
8-
from pybutton.version import VERSION
9-
10-
__all__ = [Client, ButtonClientError, VERSION]
6+
from pybutton.client import Client # noqa: 401
7+
from pybutton.error import ButtonClientError # noqa: 401
8+
from pybutton.error import HTTPResponseError # noqa: 401
9+
from pybutton.version import VERSION # noqa: 401

pybutton/request.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def request(url, method, headers, data=None, timeout=None):
6464
else:
6565
from urllib2 import Request
6666
from urllib2 import urlopen
67-
from urllib2 import HTTPError
67+
from urllib2 import HTTPError # noqa: 401
6868
from urllib import urlencode
6969
from urlparse import urlunsplit
7070
from urlparse import urlparse
@@ -151,13 +151,3 @@ def query_dict(url):
151151
if (url_components):
152152
query_string = url_components.query
153153
return parse_qs(query_string)
154-
155-
156-
__all__ = [
157-
Request,
158-
urlopen,
159-
HTTPError,
160-
request,
161-
request_url,
162-
query_dict,
163-
]

pybutton/resources/__init__.py

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

6-
from pybutton.resources.accounts import Accounts
7-
from pybutton.resources.customers import Customers
8-
from pybutton.resources.links import Links
9-
from pybutton.resources.merchants import Merchants
10-
from pybutton.resources.orders import Orders
11-
12-
__all__ = [
13-
Accounts,
14-
Customers,
15-
Links,
16-
Merchants,
17-
Orders
18-
]
6+
from pybutton.resources.accounts import Accounts # noqa: 401
7+
from pybutton.resources.customers import Customers # noqa: 401
8+
from pybutton.resources.links import Links # noqa: 401
9+
from pybutton.resources.merchants import Merchants # noqa: 401
10+
from pybutton.resources.orders import Orders # noqa: 401

pybutton/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = '2.6.0'
1+
VERSION = '2.6.1'

0 commit comments

Comments
 (0)