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
Add ruff config to pyproject.toml for devs who are interested
The change to legend_handler was a numpydoc docstring with an errant
black line after the Parameters section header.
It was flagged by ruff (but not flake8), but I agree that it should be
changed after reviewing numpydoc standards.
Applying the `ruff --fix .` removed the blank line, and that was the
only flagged error after converting the flake8 config to ruff config.
While I was looking at the config, I realized that some of the E502
(line length) ignores were out of date since we bumped the line length
to 88, so I removed those ignores from both configs.
I did not change any files to adhere to the new limit, only removed
ignores which failed the 79 limit but pass at 88.
One note is that the flake8 config selects `C90` (mccabe complexity) but
does not set a `max-complexity` value, meaning that the check is
ignored. For ruff, a default complexity (10) is selected, and we have
many methods which fail (our worst is 73 in sankey, but ~180 above 10).
As such I removed it from the ruff config, rather than adding ignores,
etc.
At this time, I'm not enabling ruff on CI because it is missing 9 checks
selected by flake8. Once those checks are implemented (or at least the
more commonly applicable ones, not too worried about "semicolon at end
of line", if I'm honest), may look to swap over because it is faster.
(It already takes only ~1 minute for the linter CI to run most of the
time, but if it it can get down to basically the startup/queue time,
that would be just that little bit faster that you may see it before you
context switch)
All of the missing checks are from pycodestyle, but running pycodestyle
outside of flake8 runs single threaded, so the wall clock time savings
don't add up.
Combined with the increased complexity of running more than one tool,
not worth it to implement CI yet.
0 commit comments