Skip to content

Commit

Permalink
Minor flake8 adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
icgood committed Mar 19, 2023
1 parent e30bb59 commit e3f1e25
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[flake8]
extend-select = B901, B902, B903, B904
extend-ignore = ANN101, ANN102
per-file-ignores =
test/*: ANN
tasks/*: ANN, B028
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
mypy
flake8
flake8-annotations
flake8-bugbear
autopep8
pytest
Expand Down
4 changes: 2 additions & 2 deletions swimprotocol/shuffle.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ def choice(self) -> ShuffleT:
"""
try:
weak_val = random.choice(self._values) # nosec
except IndexError:
raise KeyError('choice from an empty set')
except IndexError as exc:
raise KeyError('choice from an empty set') from exc
val = weak_val()
assert val is not None
return val
Expand Down

0 comments on commit e3f1e25

Please sign in to comment.