bifrostlab / llm-assistant

Multifunctional LLM Assistant for Discord
8 stars 6 forks source link

Add pre-commit config to provide feedback on code quality before pushing #17

Closed hungdtrn closed 8 months ago

hungdtrn commented 8 months ago

In pre-commit config, I use the following hook

nqngo commented 8 months ago

Add Ruff, pre-commit plugins to the VSCode devcontainer.

Add Ruff, pre-commit to dev dependencies.

Specify pre-commit to install on post-install step.

Update from python 3.10 to python 3.12.

Ensure the poetry.lock file is now consistent with pyproject.toml.

hungdtrn commented 8 months ago

@nqngo can you clarify "Specify pre-commit to install on post-install step"? Do you mean that I should write a hook on "post-install" event for pre-commit install?

hungdtrn commented 8 months ago

@nqngo I realized that the changes I made had already been done last night

nqngo commented 8 months ago

@nqngo can you clarify "Specify pre-commit to install on post-install step"? Do you mean that I should write a hook on "post-install" event for pre-commit install?

My bad. The comment was around what has been done on my commit and not a task list. Just to clarify what I've setup.

hungdtrn commented 8 months ago

Add a few scripts in the poetry config file to run ruff, so we can also run it manually.

https://python-poetry.org/docs/cli/#run

Do you have any example of the custom script? I don't know why do we need to have some custom script for running ruff.

samhwang commented 8 months ago

Do you have any example of the custom script? I don't know why do we need to have some custom script for running ruff.

Ignore my previous comment 😓 I had a look at poetry from the npm world and thought we can define custom scripts so you don't have to type in poetry run ruff check . repeatedly.