Skip to content

Commit 980e4b1

Browse files
committed
MAINT: Fail if flake8 detects errors and fix existing errors
1 parent 2b9b9db commit 980e4b1

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424
run: |
2525
# stop the build if there are Python syntax errors or undefined names
2626
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
27-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
28-
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
27+
# The GitHub editor is 127 chars wide
28+
poetry run flake8 . --ignore=F401,F403 --count --max-complexity=10 --max-line-length=127 --statistics
2929
- name: Test with pytest
3030
run: |
3131
poetry run pytest

numpy_financial/_financial.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,14 @@
2727
'start': 1,
2828
'finish': 0}
2929

30-
# Define custom Exceptions
3130

3231
class NoRealSolutionException(Exception):
3332
""" No real solution to the problem. """
34-
3533
pass
3634

35+
3736
class IterationsExceededException(Exception):
3837
""" Maximum number of iterations reached. """
39-
4038
pass
4139

4240

0 commit comments

Comments
 (0)