Closed julianstirling closed 1 month ago
Hi @jmwright I have added two lining jobs. One lints Python files that are not directly run by cq-cli. The other lints these CadQuery scripts.
The reason they are linted separately is they require different pylint rc files. For CadQuery I have made a custom rc file that:
show_object
as additional built in.Running lint-test.py is documented in the help you get when you run ./lint-test.py -h
The CI is failing because the code has some issues that the linter has found. I think it makes sense to merge this now so that we have linting happening. And then we can open another PR to fix errors.
Thanks @jmwright
I think the main difference from black to pylint is that black automatically formats your code (unless they added more features since I last checked). Pylint doesn't actually edit the code, it just complains if things are bad. But it is designed to do far more checks to warn you about possible bugs and unsafe code.
I'm in the middle of doing a first pass fixing some things now. Once I have done that there may be some more things to fix
black automatically formats your code
Many projects run black --diff --check .
to check the code without editing it. This is especially useful in CI.
Thanks, but I think black still only checks the formatting. Not things like if variables are undefined?
Correct, I do not think that black checks the code to the extent that pylint does.
The goal of this PR is to improve the GitHub Actions to