-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
88 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,20 @@ | ||
[flake8] | ||
# E203: Conflicts with black's formatting | ||
# E501: Conflicts with black's formatting, which defaults to a max | ||
# line length of 88 but will go over if necessary. | ||
# See https://github.com/ambv/black#line-length for more info | ||
# W605: Conflicts with regular expression formatting | ||
ignore = E203,E501,E731,W503,W605 | ||
import-order-style = google | ||
# Packages added in this list should be added to the setup.cfg file as well | ||
application-import-names = | ||
pypants | ||
exclude = | ||
*vendor* | ||
.venv | ||
.env | ||
.pants.d | ||
.pantscache | ||
.git | ||
__init__.py | ||
setup.py |
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,10 @@ | ||
.DS_Store | ||
.venv* | ||
.vscode | ||
**/__pycache__/ | ||
**/.cache/ | ||
**/.tox | ||
**/*.coverage | ||
**/*.egg-info | ||
**/*.pyc | ||
**/dist |
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,58 @@ | ||
--- | ||
default_stages: [commit] | ||
|
||
default_language_version: | ||
python: python3 | ||
|
||
exclude: "examples/.*$" | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.4.0 | ||
hooks: | ||
- id: check-ast | ||
- id: check-builtin-literals | ||
- id: check-byte-order-marker | ||
- id: check-executables-have-shebangs | ||
# Need to define stages explicitly since `default_stages` was not being respected | ||
stages: [commit] | ||
- id: check-merge-conflict | ||
- id: debug-statements | ||
- id: forbid-new-submodules | ||
- id: no-commit-to-branch | ||
- id: trailing-whitespace | ||
args: [--markdown-linebreak-ext=md] | ||
# Need to define stages explicitly since `default_stages` was not being respected | ||
stages: [commit] | ||
|
||
- repo: local | ||
hooks: | ||
- id: isort | ||
name: Sort Python imports (isort) | ||
entry: isort | ||
language: python | ||
types: [file, python] | ||
additional_dependencies: [isort==4.3.16] | ||
|
||
- id: black | ||
name: Format Python (black) | ||
entry: black | ||
language: python | ||
types: [file, python] | ||
additional_dependencies: [black==19.3b0] | ||
|
||
- id: pydocstyle | ||
name: Lint Python docstrings (pydocstyle) | ||
entry: pydocstyle | ||
language: python | ||
types: [file, python] | ||
additional_dependencies: [pydocstyle==4.0.1] | ||
|
||
- id: flake8 | ||
name: Lint Python (flake8) | ||
entry: flake8 --config .flake8 | ||
language: python | ||
types: [file, python] | ||
additional_dependencies: | ||
- flake8==3.7.9 | ||
- "flake8-import-order<0.19,>=0.18" |