Skip to content

Commit

Permalink
[Fixes #5719] Add pre-commit and black
Browse files Browse the repository at this point in the history
  • Loading branch information
frafra committed Feb 18, 2020
1 parent f60ff13 commit 3e47fd4
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 19.10b0
hooks:
- id: black
15 changes: 15 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[tool.black]
line-length = 120
target-version = 'py35'
exclude = '''
/(
geonode/.*/migrations/.*
| geonode/.*/settings.py
| management
| scripts
| docs
| static
| migrations
| node_modules
)/
'''
3 changes: 2 additions & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
ipdb
ipdb
pre-commit

0 comments on commit 3e47fd4

Please sign in to comment.