Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I do like to be notified if I leave an unused import in my code, so I tried adding the F401 rule to my Makefile. It flagged the unused import of `page` into `wpsite`, which was there to make the `page` module importable in tests with: from .context import page Unused imports can be silenced by defining `__all__`, so it made sense to squash that by listing the modules in `__all__`. However, given that I included the import for testing purposes, why not move the fix to the test setup? So I've explicitly imported all tested modules in `tests/context.py` instead. I then realised that I was only one step away from enabling all of ruff's linting rules; ignoring E402 which complains if module-level imports aren't at the top of the file. That was easily fixed with a quick: ruff check --add-noqa .
- Loading branch information