Skip to content

Commit

Permalink
Add ignores for new PIE786 lint
Browse files Browse the repository at this point in the history
Local noqa override for conftest.py, because *any* error during
the Sphinx live-load is a failing test.

Blanket override on cmdline.py for now, awaiting the exception
hierarchy rework of #118.
  • Loading branch information
bskinn committed Oct 24, 2020
1 parent c36bbf9 commit c434d65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 2 additions & 4 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,11 @@ def sphinx_load_test():

def func(path):
"""Perform the 'live' inventory load test."""
# Easier to have the file open the whole time
with path.open("rb") as f:

# Attempt the load operation
try:
IFile.load(f, "", osp.join)
except Exception as e:
except Exception as e: # noqa: PIE786
# An exception here is a failing test, not a test error.
pytest.fail(e)

return func
Expand Down
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ per_file_ignores =
tests/*: S101, RST304,RST305,RST306
conftest.py: D202, S101, RST304,RST305,RST306
# F401: MANY things imported but unused in __init__,py
src/sphobjinv/__init__.py: F401 RST304,RST305,RST306
src/sphobjinv/__init__.py: F401, RST304,RST305,RST306
# PIE786: CLI uses 'except Exception:' as a catchall... to be changed, eventually
src/sphobjinv/cmdline.py: PIE786, RST304,RST305,RST306

#flake8-import-order
import-order-style = smarkets
Expand Down

0 comments on commit c434d65

Please sign in to comment.