Skip to content

Commit

Permalink
update pre-commit and add prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
andersy005 committed Jul 16, 2022
1 parent 70a2425 commit 1d73f28
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 19 deletions.
58 changes: 39 additions & 19 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,48 @@
ci:
autoupdate_schedule: monthly

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-json
- id: check-yaml
- id: double-quote-string-fixer
- id: debug-statements
- id: mixed-line-ending

- repo: https://github.com/asottile/pyupgrade
rev: v2.37.1
hooks:
- id: pyupgrade
args:
- '--py38-plus'

- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
- id: black-jupyter

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
- repo: https://github.com/keewis/blackdoc
rev: v0.3.4
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-json
- id: check-yaml
- id: pretty-format-json
args: ["--autofix", "--indent=2", "--no-sort-keys"]
- id: blackdoc

- repo: https://github.com/ambv/black
rev: 19.10b0
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: black
args: ["--line-length", "100"]
- id: flake8

- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: flake8
- id: isort

- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.2.0
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: isort
- id: prettier
3 changes: 3 additions & 0 deletions .prettierrc.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
tabWidth = 2
semi = false
singleQuote = true
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
[tool.black]
line-length = 100
target-version = ['py38']
skip-string-normalization = true
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[flake8]
max-line-length = 100
max-complexity = 18
select = B,C,E,F,W,T4,B9

[isort]
known_first_party=pangeo_forge_recipes
Expand Down

0 comments on commit 1d73f28

Please sign in to comment.