-
-
Save fbatroni/e2c1423d53962143912c4fc6d9e6af6e to your computer and use it in GitHub Desktop.
Standard pre commit and isort, flake8 settings
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
[flake8] | |
max-line-length = 88 | |
max-complexity = 12 | |
select = C,E,F,W,B,B950 | |
ignore = E203, E501, W503 |
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
[settings] | |
multi_line_output=3 | |
include_trailing_comma=True | |
force_grid_wrap=0 | |
use_parentheses=True | |
line_length=80 | |
known_third_party= | |
known_first_party= |
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
--- | |
repos: | |
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: v2.4.0 | |
hooks: | |
- id: end-of-file-fixer | |
language_version: python3.5 | |
stages: [commit, push] | |
- id: trailing-whitespace | |
language_version: python3.5 | |
args: [--markdown-linebreak-ext=md] | |
stages: [commit, push] | |
- repo: https://github.com/asottile/seed-isort-config | |
rev: v1.9.3 | |
hooks: | |
- id: seed-isort-config | |
- repo: https://github.com/pre-commit/mirrors-isort | |
rev: v4.3.21 | |
hooks: | |
- id: isort | |
language_version: python3.5 | |
stages: [commit, push] | |
- repo: https://github.com/python/black | |
rev: 19.10b0 | |
hooks: | |
- id: black | |
language_version: python3.6 | |
args: [--line-length=80] | |
stages: [commit, push] | |
# Lint Python and Pass/Fail | |
# - repo: https://github.com/PyCQA/pydocstyle | |
# rev: 4.0.1 | |
# hooks: | |
# - id: pydocstyle | |
# language_version: python3.5 | |
# stages: [commit, push] | |
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: v2.4.0 | |
hooks: | |
- id: check-byte-order-marker | |
language_version: python3.5 | |
stages: [commit, push] | |
- repo: https://gitlab.com/pycqa/flake8 | |
rev: 3.7.9 | |
hooks: | |
- id: flake8 | |
language_version: python3.5 | |
args: [--max-line-length=88] | |
stages: [commit, push] | |
- repo: https://github.com/pre-commit/mirrors-mypy | |
rev: v0.740 | |
hooks: | |
- id: mypy | |
language_version: python3.5 | |
stages: [commit, push] | |
# Other Linters | |
- repo: https://github.com/adrienverge/yamllint.git | |
rev: v1.18.0 | |
hooks: | |
- id: yamllint | |
args: ["-d {extends: relaxed, rules: {line-length: {max: 120}}}"] | |
stages: [commit, push] | |
- repo: https://github.com/pryorda/dockerfilelint-precommit-hooks | |
rev: v0.1.0 | |
hooks: | |
- id: dockerfilelint | |
stages: [commit, push] | |
- repo: local | |
hooks: | |
- id: rtestthat | |
name: rtestthat | |
entry: /usr/bin/make test | |
language: script | |
pass_filenames: false | |
# alternatively you could `types: [r]` so it only runs when r files change | |
# though tests might be invalidated if you were to say change a data file | |
always_run: true | |
... |
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
test: | |
Rscript -e 'source("tests/testthat.R")' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment