10000 Fix flake8 issues · pythonthings/github3.py@0a2010c · GitHub
[go: up one dir, main page]

Skip to content

Commit 0a2010c

Browse files
committed
Fix flake8 issues
Ran into these in an unrelated PR. Don't have a bare except Don't use single char variables Also cap pytest at below 3.3.0, which drops support for py33 (we could drop py33 support as well) Signed-off-by: Jesse Keating <jkeating@j2solutions.net>
1 parent c82e90e commit 0a2010c

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

dev-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.
22
#coverage==3.5.2
33
mock==1.0.1
4-
pytest>=2.3.5
4+
pytest>=2.3.5,<3.3.0
55
wheel==0.21.0
66
betamax>=0.5.0
77
betamax_matchers>=0.2.0

github3/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def __init__(self, resp):
1818
#: List of errors provided by GitHub
1919
if error.get('errors'):
2020
self.errors = error.get('errors')
21-
except: # Amazon S3 error
21+
except Exception: # Amazon S3 error
2222
self.msg = resp.content or '[No message]'
2323

2424
def __repr__(self):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
'pyasn1'
2424
]
2525

26-
kwargs['tests_require'] = ['betamax >=0.2.0', 'pytest',
26+
kwargs['tests_require'] = ['betamax >=0.2.0', 'pytest <3.3.0',
2727
'betamax-matchers>=0.1.0']
2828
if sys.version_info < (3, 0):
2929
kwargs['tests_require'].append('unittest2 ==0.5.1')

tests/integration/test_github.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,10 @@ def test_gitignore_templates(self):
216216
"""Test the ability to retrieve a list of gitignore templates."""
217217
cassette_name = self.cassette_name('gitignore_templates')
218218
with self.recorder.use_cassette(cassette_name):
219-
l = self.gh.gitignore_templates()
219+
thelist = self.gh.gitignore_templates()
220220

221-
assert l != []
222-
assert isinstance(l, list)
221+
assert thelist != []
222+
assert isinstance(thelist, list)
223223

224224
def test_is_following(self):
225225
"""Test the ability to check if a user is being followed."""

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pip_pre = False
88
deps =
99
requests{env:REQUESTS_VERSION:>=2.0}
1010
mock==1.0.1
11-
pytest>=2.3.5
11+
pytest>=2.3.5,<3.3.0
1212
betamax>=0.5.1
1313
betamax_matchers>=0.3.0
1414
pypy,py27: unittest2

0 commit comments

Comments
 (0)
0