You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.
I an always frustrated when our code quality could be improved.
Describe the solution you'd like
A clear and concise description of what you want to happen.
As discussed at #189 (comment), once #189 has been merged there should be an effort to remove some ruff rules from the tool.ruff.ignore of pyproject.toml.
For instance, ruff rule B028 (no-explicit-stacklevel) is currently on the list so a new pull request could be created to remove it from the list and fix all instances so that this project's nox tests pass.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
% pipx install ruff
% ruff rule B028
no-explicit-stacklevel (B028)
Derived from the flake8-bugbear linter.
What it does
Checks for warnings.warn calls without an explicit stacklevel keyword
argument.
Why is this bad?
The warnings.warn method uses a stacklevel of 1 by default, which
limits the rendered stack trace to that of the line on which the warn method is called.
It's recommended to use a stacklevel of 2 or higher, give the caller
more context about the warning.
Example
warnings.warn("This is a warning")
Use instead:
warnings.warn("This is a warning", stacklevel=2)
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.
I an always frustrated when our code quality could be improved.
Describe the solution you'd like
A clear and concise description of what you want to happen.
As discussed at #189 (comment), once #189 has been merged there should be an effort to remove some ruff rules from the
tool.ruff.ignore
ofpyproject.toml
.For instance,
ruff rule B028
(no-explicit-stacklevel) is currently on the list so a new pull request could be created to remove it from the list and fix all instances so that this project'snox
tests pass.Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
%
pipx install ruff
%
ruff rule B028
no-explicit-stacklevel (B028)
Derived from the flake8-bugbear linter.
What it does
Checks for
warnings.warn
calls without an explicitstacklevel
keywordargument.
Why is this bad?
The
warnings.warn
method uses astacklevel
of 1 by default, whichlimits the rendered stack trace to that of the line on which the
warn
method is called.It's recommended to use a
stacklevel
of 2 or higher, give the callermore context about the warning.
Example
Use instead:
The text was updated successfully, but these errors were encountered: