Skip to content

Commit

Permalink
Fix flake8 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mgedmin committed Apr 12, 2019
1 parent 6245223 commit aa548e9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ FILE_WITH_CHANGELOG = CHANGES.rst
default:
@echo "Nothing to build here"

.PHONY: flake8
flake8:
flake8 *.py

.PHONY: test check
test check:
$(PYTHON) test_profilehooks.py
Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ universal = 1

[flake8]
doctests = yes
# some doctests in test_profilehooks.py are long and I see no clean way of
# wrapping them
max-line-length = 100

[zest.releaser]
python-file-with-version = profilehooks.py
5 changes: 3 additions & 2 deletions test_profilehooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ def sample_fn_2(self):
""".format(linenumber)))


if profilehooks.hotshot is not None:

class TestCoverageWithHotShot(TestCoverage):
decorator = staticmethod(profilehooks.coverage_with_hotshot)

Expand Down Expand Up @@ -559,7 +561,7 @@ def additional_tests():
return unittest.TestSuite([
unittest.defaultTestLoader.loadTestsFromName(__name__),
doctest.DocTestSuite(setUp=setUp, tearDown=tearDown,
optionflags=optionflags),
optionflags=optionflags),
])


Expand All @@ -568,4 +570,3 @@ def additional_tests():
__name__ = 'test_profilehooks'
sys.modules[__name__] = sys.modules['__main__']
unittest.main(defaultTest='additional_tests')

0 comments on commit aa548e9

Please sign in to comment.