Skip to content

Commit

Permalink
Add linting configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
abn committed Jul 23, 2020
1 parent cdc08a0 commit b40e20e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[flake8]
max-line-length = 88
ignore = E501, E203, W503
per-file-ignores = __init__.py:F401
exclude =
.git
__pycache__
dist
vendor
.venv
.tox
.pytest_cache
.github
_legacy
_internal
25 changes: 25 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
repos:
- repo: https://github.com/psf/black
rev: 19.10b0
hooks:
- id: black
exclude: &exclude |
(?x)(
^src/gnmi/proto/_internal/.*
| ^src/gnmi/proto/_legacy/.*
)

- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3
hooks:
- id: flake8
exclude: *exclude

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
hooks:
- id: trailing-whitespace
exclude: *exclude
- id: end-of-file-fixer
exclude: *exclude
- id: debug-statements

0 comments on commit b40e20e

Please sign in to comment.