Closed CerineBnsd closed 2 years ago
Cool stuff! Question though, why are you supporting Flake and Black in the same time? Those lints doesn't work too well together.
Cool stuff! Question though, why are you supporting Flake and Black in the same time? Those lints doesn't work too well together.
I thought like this as well, but I documented a bit and found things like this:
Does back replace flake8 ? Not at all. Black only reformats, you still run flake8 to check for various issues not covered by black. Flake8 very close to be perfectly compatible with black.
And actually that was right when I tested, black reformat the files, but doesn't check some issues that are only mentioned by flake8 (for example, using f strings with no placeholder ... ) that are useful, on the other hand, running flake alone won't reformat. The configuration that is used for flake eliminates the contradicting rules and worked fine.
Description
Use pre-commit hooks, to apply python lint/formatting and rust formatting automatically before making commits. Only once, when cloning the repo / pulling these changes, it's needed to install pre-commit:
and run:
Related Issue
None.
Type of change
Not affecting the existing codebase.
How Has This Been Tested?
On some test commits.
Checklist: