format: replaced black with ruff for code formatting (Bug 2036413)#1134
format: replaced black with ruff for code formatting (Bug 2036413)#1134Magnolia-Liu wants to merge 8 commits intomozilla-conduit:mainfrom
Conversation
Remove black references from format, tests and documentation.
|
View this pull request in Lando to land it once approved. |
| @echo "target is one of:" | ||
| @echo " help show this message and exit" | ||
| @echo " format run ruff and black on source code" | ||
| @echo " format run ruff on source code" |
There was a problem hiding this comment.
Technically, we also run djLint with this command. It would be good to update that now. :)
zzzeid
left a comment
There was a problem hiding this comment.
Couple of questions: is there any way to tweak the setting so that migration files are not affected? This would be ideal for two reasons (1) it would be good to avoid editing old migration files in general and (2) every new migration file will run into this problem, since these files are generated by Django (those are the files under migrations subdirectories).
| "src/lando/version/__init__.py", | ||
| ] | ||
|
|
||
| extend-exclude = ["src/lando/version/__init__.py", "src/lando/*/migrations/*"] |
There was a problem hiding this comment.
nit: Do we need this both in the ruff.toml and pyproject.toml? Ideally, we should have as much as the config in pyproject.toml, and hopefully none in ruff.toml.
OTOH, if that doesn't work, I think it would be preferable to have the things in ruff.toml, and no duplication.
There was a problem hiding this comment.
Keeping the exclude in only pyproject.toml didn't work so instead I'm keeping it in ruff.toml
Remove black references from format, tests and documentation.