You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To ensure our project's code quality and consistency, I propose that we consider adopting ruff as our primary tool for code formatting and linting. ruff is a cutting-edge tool that amalgamates the capabilities of black, isort, and flake8, facilitating the automation of code style standardization to enhance readability and maintainability.
I have explored configuring ruff and found that we can seamlessly integrate it by adding some basic settings to our pyproject.toml. This approach ensures uniform code styling without the need for manual adjustments across multiple tools. For reference, here's a template: Python Package Template.
Within our development workflow, we can format our code using the following command:
poetry run ruff format --config pyproject.toml litellm
This command will format the code within the hooks and tests directories, ensuring consistency before commits.
Moreover, I recommend integrating ruff into our pre-commit hooks. This automatic check will prevent code style inconsistencies from being merged into our codebase.
Finally, to guarantee consistent code styling throughout our project, I suggest employing GitHub Actions to automate code format checking. This ensures that any commits not adhering to our styling standards are flagged for correction before merging into the main branch.
By adopting ruff, I believe we can further elevate our code quality and foster a smoother collaborative experience for our team. I look forward to hearing your thoughts and am happy to answer any questions regarding this proposal.
There projects use code format tool as references.
The Feature
Hi there,
To ensure our project's code quality and consistency, I propose that we consider adopting
ruff
as our primary tool for code formatting and linting. ruff is a cutting-edge tool that amalgamates the capabilities ofblack
,isort
, andflake8
, facilitating the automation of code style standardization to enhance readability and maintainability.ref: enhancing-python-code-quality-a-comprehensive-guide-to-linting-with-ruff
I have explored configuring
ruff
and found that we can seamlessly integrate it by adding some basic settings to ourpyproject.toml
. This approach ensures uniform code styling without the need for manual adjustments across multiple tools. For reference, here's a template: Python Package Template.Within our development workflow, we can format our code using the following command:
This command will format the code within the
hooks
andtests
directories, ensuring consistency before commits.Moreover, I recommend integrating
ruff
into our pre-commit hooks. This automatic check will prevent code style inconsistencies from being merged into our codebase.Finally, to guarantee consistent code styling throughout our project, I suggest employing GitHub Actions to automate code format checking. This ensures that any commits not adhering to our styling standards are flagged for correction before merging into the main branch.
By adopting
ruff
, I believe we can further elevate our code quality and foster a smoother collaborative experience for our team. I look forward to hearing your thoughts and am happy to answer any questions regarding this proposal.There projects use code format tool as references.
Developers can not pass the github actions check if there is no formatting. To ensure consistency in code style.
Motivation, pitchzh
To ensure our project's code quality and consistency.
The text was updated successfully, but these errors were encountered: