feat(lint): add pre-commit and linter as dependencies of the project#387
Merged
Shillaker merged 2 commits intoBoavizta:mainfrom Dec 30, 2025
Merged
feat(lint): add pre-commit and linter as dependencies of the project#387Shillaker merged 2 commits intoBoavizta:mainfrom
Shillaker merged 2 commits intoBoavizta:mainfrom
Conversation
Collaborator
Author
|
I chose ruff because it's one of the best and fastest linter at the moment, it is still maintained and has an important community. I tested the configuration using a dummy modification of main.py and a clean installation of the repository, seems to work fine (venv) jperron:~/boaviztapi-dev$ git checkout -b chore/test_pre-commit
Basculement sur la nouvelle branche 'chore/test_pre-commit'
(venv) jperron:~/boaviztapi-dev$ git status
Sur la branche chore/test_pre-commit
Modifications qui ne seront pas validées :
(utilisez "git add <fichier>..." pour mettre à jour ce qui sera validé)
(utilisez "git restore <fichier>..." pour annuler les modifications dans le répertoire de travail)
modifié : boaviztapi/main.py
aucune modification n'a été ajoutée à la validation (utilisez "git add" ou "git commit -a")
(venv) jperron:~/boaviztapi-dev$ git add boaviztapi/main.py
(venv) jperron:~/boaviztapi-dev$ git commit
ruff.....................................................................Passed
[chore/test_pre-commit 44b5542] WIP test
1 file changed, 1 insertion(+) |
Changelog: * Add pre-commit in dev dependancies of pyproject.toml * Add ruff as linter in dev dependancies of pyproject.toml * Add pre-commit config file and set configuration for ruff * Update Contributing.md to mention the requirement of using pre-commit before merging * Update dockerignore to ignore pre-commit related files
bba2fca to
2555b87
Compare
1061ff3 to
b54caa6
Compare
Collaborator
|
Hi @jonperron I added a couple of suggestions:
The CI linting step now passes, but obviously lots of linting is ignored for this to work. To fully fix, we need to go through the Note that there is also the question of formatting. It would be great to run |
987a5b6 to
6850057
Compare
Closed
6850057 to
34f1c68
Compare
Shillaker
approved these changes
Dec 30, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog:
Fix #364