forked from frappe/bench
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Base pre-commit checks for trailing whitespces, valid files, etc * pyupgrade with PY37+ syntax * Aditya's black fork for codebases with tabs * Flake8 with Frappe's config
- Loading branch information
1 parent
a481934
commit b1b8d70
Showing
2 changed files
with
73 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
[flake8] | ||
ignore = | ||
E121, | ||
E126, | ||
E127, | ||
E128, | ||
E203, | ||
E225, | ||
E226, | ||
E231, | ||
E241, | ||
E251, | ||
E261, | ||
E265, | ||
E302, | ||
E303, | ||
E305, | ||
E402, | ||
E501, | ||
E741, | ||
W291, | ||
W292, | ||
W293, | ||
W391, | ||
W503, | ||
W504, | ||
F403, | ||
B007, | ||
B950, | ||
W191, | ||
E124, # closing bracket, irritating while writing QB code | ||
E131, # continuation line unaligned for hanging indent | ||
E123, # closing bracket does not match indentation of opening bracket's line | ||
E101, # ensured by use of black | ||
|
||
max-line-length = 200 |
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,37 @@ | ||
exclude: '.git' | ||
default_stages: [commit] | ||
fail_fast: false | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
files: "frappe.*" | ||
exclude: ".*json$|.*txt$|.*csv|.*md|.*svg" | ||
- id: check-yaml | ||
- id: check-merge-conflict | ||
- id: check-ast | ||
- id: check-json | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: debug-statements | ||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.34.0 | ||
hooks: | ||
- id: pyupgrade | ||
args: ['--py37-plus'] | ||
|
||
- repo: https://github.com/adityahase/black | ||
rev: 9cb0a69f4d0030cdf687eddf314468b39ed54119 | ||
hooks: | ||
- id: black | ||
additional_dependencies: ['click==8.0.4'] | ||
|
||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.9.2 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: ['flake8-bugbear',] | ||
args: ['--config', '.flake8'] |