Introduce linters for possible bugs (flake8-bugbear) and correct sphinx links in the docs (flake8-sphinx-links).
Besides some minor changes the most noticable change is setting the stacklevel of warnings since this is required by flake8-bugbear:
B028: No explicit stacklevel keyword argument found. The warn method from the warnings module uses a stacklevel of 1 by default. This will only show a stack trace for the line on which the warn method is called. It is therefore recommended to use a stacklevel of 2 or greater to provide more information to the user.
Here, I set the level to stacklevel=1 (the default) meaning that no additional backtrace information is given. I think we do not need more information for the user because the warnings are well written and a link and codeblock does not help much. If you disagree we can also set it to 2 or 3.
Introduce linters for possible bugs (
flake8-bugbear
) and correct sphinx links in the docs (flake8-sphinx-links
).Besides some minor changes the most noticable change is setting the
stacklevel
of warnings since this is required by flake8-bugbear:Here, I set the level to
stacklevel=1
(the default) meaning that no additional backtrace information is given. I think we do not need more information for the user because the warnings are well written and a link and codeblock does not help much. If you disagree we can also set it to2
or3
.We had already a discussion in equistore.
:books: Documentation preview :books:: https://scikit-matter--178.org.readthedocs.build/en/178/