Open-Assistant icon indicating copy to clipboard operation
Open-Assistant copied to clipboard

ci: switch flake8 by ruff

Open Borda opened this issue 2 years ago • 11 comments

Ruff is quite a new linter with impresive speed and offers to add multiple checks...

Ruff aims to be orders of magnitude faster than alternative tools while integrating more functionality behind a single, common interface. Ruff can be used to replace Flake8 (plus dozens of plugins), isort, pydocstyle, yesqa, eradicate, pyupgrade, and autoflake, all while executing tens or hundreds of times faster than any individual tool.

Also, I would suggest installing pre-commit bot, which helps to fix code within each PR so, lowering developer overhead... see: https://pre-commit.ci/

Borda avatar Feb 05 '23 07:02 Borda

:x: pre-commit failed. Please run pre-commit run --all-files locally and commit the changes. Find more information in the repository's CONTRIBUTING.md

github-actions[bot] avatar Feb 05 '23 07:02 github-actions[bot]

:x: pre-commit failed. Please run pre-commit run --all-files locally and commit the changes. Find more information in the repository's CONTRIBUTING.md

github-actions[bot] avatar Feb 05 '23 08:02 github-actions[bot]

Will the config you've set it up with cause it to lint with the exact same rules as flake8 had?

olliestanley avatar Feb 05 '23 15:02 olliestanley

Will the config you've set it up with cause it to lint with the exact same rules as flake8 had?

With my best knowledge, yes (I have converted a few my personal projects and haven't seen any downside)

Borda avatar Feb 05 '23 23:02 Borda

Will the config you've set it up with cause it to lint with the exact same rules as flake8 had?

With my best knowledge, yes (I have converted a few my personal projects and haven't seen any downside)

Ok, in that case I am fine with this change but will wait for others to respond

olliestanley avatar Feb 05 '23 23:02 olliestanley

mind have a look @yk @andreaskoepf pls :rabbit:

Borda avatar Feb 06 '23 15:02 Borda

UPDATE, with https://pre-commit.ci/#configuration-skip we can use autofix via the bot for all hooks except locals :chipmunk:

Borda avatar Feb 09 '23 11:02 Borda

:x: pre-commit failed. Please run pre-commit run --all-files locally and commit the changes. Find more information in the repository's CONTRIBUTING.md

github-actions[bot] avatar Feb 09 '23 11:02 github-actions[bot]

mind have a look @yk @andreaskoepf pls :chipmunk:

Borda avatar Feb 20 '23 18:02 Borda

friendly ping @yk @andreaskoepf :otter:

Borda avatar Mar 07 '23 14:03 Borda

Gentle ping @yk @andreaskoepf :chipmunk: also fine to close it :cowboy_hat_face:

Borda avatar Mar 24 '23 14:03 Borda

ruff seems to be interesting, before merge someone needs to verify that it is working seamlessly as a flake8 replacement for the OA project.

andreaskoepf avatar Jun 07 '23 07:06 andreaskoepf

verify that it is working seamlessly

what do you mean? :chipmunk:

Borda avatar Jun 07 '23 08:06 Borda

closed in favor of #3323 (which includes these changes, could not push merge to original repo since it was archived)

andreaskoepf avatar Jun 07 '23 20:06 andreaskoepf

could not push merge to original repo since it was archived)

you see me responding promptly, so you could just remind me to unarchive it :D and wai a few hours while I was waiting for several months :flamingo:

Borda avatar Jun 07 '23 23:06 Borda