-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This removes the need for black, autopep8, and isort Also includes the configuration for pre-commit ci, if it is decided that it should be added.
- Loading branch information
1 parent
1d1ff53
commit 7f643b8
Showing
6 changed files
with
143 additions
and
85 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
default_stages: [commit, push] | ||
fail_fast: false | ||
exclude: ^(intranet/middleware|intranet/apps/.*/migrations|intranet/static/.*vendor/.*|intranet/.*/stubs|Ion.egg-info|\.github) | ||
|
||
# This is for pre-commit ci | ||
# After adding pre-commit ci, the "linting" stage of the tests | ||
# can be safely deleted | ||
ci: | ||
autofix_commit_msg: | | ||
chore: auto fixes from pre-commit hooks | ||
for more information, see https://pre-commit.ci | ||
autoupdate_commit_msg: 'build: pre-commit autoupdate' | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-ast | ||
name: Validate Python | ||
- id: trailing-whitespace | ||
- id: mixed-line-ending | ||
args: ["--fix=lf"] | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: detect-private-key | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.3.5 | ||
hooks: | ||
- id: ruff | ||
args: [ "--fix", "--exit-non-zero-on-fix" ] | ||
name: ruff lint | ||
files: ^intranet/apps/.* | ||
- id: ruff-format | ||
files: ^intranet/apps/.* | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.5 | ||
hooks: | ||
- id: codespell | ||
files: ^.*\.(py|md|rst)$ | ||
# TODO: Remove after python version >= 3.11 | ||
additional_dependencies: | ||
- tomli |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
.gitattributes | ||
.gitignore | ||
.isort.cfg | ||
.pre-commit-config.yaml | ||
.pylintrc | ||
.style.yapf | ||
CONTRIBUTING.md | ||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ pylint-django==2.5.5 | |
pylint-plugin-utils==0.8.2 | ||
names==0.3.0 | ||
whitenoise==6.6.0 | ||
pre-commit==3.5.0 |