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.
Description
This PR enables automatic linting fixes using pre-commit CI. Please watch the team learning session for a full introduction.
I have left
autofix_prs
enabled for now because I think it's the best option to try out. If we find it a nuisance then we can switch to a different workflow where you need to manually commentpre-commit.ci autofix
in order to trigger the linting fix.What this means is that pre-commit CI will automatically make linting fix commits on your branch, and if you try to push on top of that you will get a failure from git "Updates were rejected because the remote contains work that you do not have locally". If you use PyCharm then a window will pop up:
The recommended strategy is "Rebase". Tick "Remember ..." if In future you don't want to be prompted again (also recommended).
If the window didn't pop up or you clicked the wrong button or something then you can also specify this in your PyCharm settings:
If you do git from command line then I recommend setting
You could also set an alias for
git pp
to do "pull and then push":Checklist
Types of changes
Notice
I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":