hume-python-sdk
hume-python-sdk copied to clipboard
feat: Migrate to Ruff
Simplify linting toolchain from migrating away from Pylint, isort, and Black to Ruff. There are still some minor gaps in terms of full pylint support, so feel free to close this out if we feel the fact that not all rules are supported is a blocker here, but in general Ruff is being adopted by a great deal of major Python open-source projects (FastAPI, Pandas, Airflow, etc) and is 10-100x faster than traditional Python linters.
Also, to help with ensuring that modern type hints can be used anywhere, automatically defer annotations in each file.
This is great @max-muoto! Thanks for adding this. Personally, I'm not concerned about lack of full pylint coverage.
Before we merge, will you run ruff format on the existing files in the repo to avoid future messy diffs?
And I'm not sure if you're a vscode user, but will you also update .vscode/settings.json to use ruff instead of black, isort, pylint?
"[python]": { "editor.defaultFormatter": "charliermarsh.ruff" },
"ruff.format.args": ["--config", "pyproject.toml"],
This is great @max-muoto! Thanks for adding this. Personally, I'm not concerned about lack of full pylint coverage.
Before we merge, will you run ruff format on the existing files in the repo to avoid future messy diffs?
And I'm not sure if you're a vscode user, but will you also update
.vscode/settings.jsonto use ruff instead of black, isort, pylint?"[python]": { "editor.defaultFormatter": "charliermarsh.ruff" }, "ruff.format.args": ["--config", "pyproject.toml"],
I thought I did so for some reason, done! I updated the .vscode/settings.json as well, it should automatically use the pyproject.toml, so left that out, but if you prefer to be explicit can tweak things.
Thanks @max-muoto for all your work on this. We've started using a client generator for this SDK and won't be using ruff, but all of your contributions are very appreciated!
Thanks @max-muoto for all your work on this. We've started using a client generator for this SDK and won't be using ruff, but all of your contributions are very appreciated!
No worries, thanks!