jinja
jinja copied to clipboard
Maintenance: resolve flake8-bugbear B036 errors
Resolves two B036 errors reported by recent versions of the flake8-bugbear plugin for flake8.
- Ignores one error report in case 1-of-2 where the exception is intentionally not re-raised.
- Adjusts the exception handler base class in case 2-of-2 where the exception handler was introduced to handle the non-existence of an imported module.
- fixes #1941
Checklist:
- [ ] ~~Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.~~
- [ ] ~~Add or update relevant docs, in the docs folder and in code.~~
- [ ] ~~Add an entry in
CHANGES.rstsummarizing the change and linking to the issue.~~ - [ ] ~~Add
.. versionchanged::entries in any relevant code docs.~~ - [x] Run
pre-commithooks and fix any issues. - [x] Run
pytestandtox, no tests failed (note:toxtested Python versions 3.11.8, 3.12.2).