fpdf2 icon indicating copy to clipboard operation
fpdf2 copied to clipboard

Replace black/pylint with ruff

Open qarmin opened this issue 2 years ago • 2 comments

Currently static checks takes 1 minute to apply - https://github.com/py-pdf/fpdf2/actions/runs/7676162269/job/20923341563

With ruff, this time should decrease to max ~10s without cache and 1s with cache

qarmin avatar Jan 29 '24 19:01 qarmin

Hi @qarmin,

Thank you for the suggestion. I've been reading Ruff's documentation and so far ruff is not a drop-in replacement for pylint https://docs.astral.sh/ruff/faq/#how-does-ruffs-linter-compare-to-pylint

I am running some tests, and maybe we can use ruff formatter replacing black and use the ruff linter alongside pylint.

andersonhc avatar Feb 05 '24 12:02 andersonhc

Yes, ruff is not a 1:1 replacement for pylint. Having switched from pylint in one project I've used, I didn't find any functionality in it that the lack of in ruff blocked me from switching.

Ruff + mypy would probably offer almost everything that pylint offers

qarmin avatar Feb 05 '24 13:02 qarmin