Skip to content

Instantly share code, notes, and snippets.

@elcolie
Created March 5, 2021 08:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elcolie/76c32417b1b23d76e2f9b0f9b3aecdd1 to your computer and use it in GitHub Desktop.
Save elcolie/76c32417b1b23d76e2f9b0f9b3aecdd1 to your computer and use it in GitHub Desktop.
winglue pre-commit
default_language_version:
python: python
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.2.0
hooks:
- id: trailing-whitespace
types: [python]
- id: end-of-file-fixer
types: [python]
- repo: https://github.com/ambv/black
rev: 18.5b0
hooks:
- id: black
name: black
# language: system
language_version: python
types: [python]
args:
- "-l 80"
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.1
hooks:
- id: flake8
# language: system
language_version: python
types: [python]
args:
- "--ignore=E203, E231, E501, W503, SC100, SC200"
- repo: https://github.com/pre-commit/mirrors-pylint
rev: v2.4.4
hooks:
- id: pylint
# language: system
language_version: python
types: [python]
args:
- --rcfile=/i/src/winglue/pylintrc
- --max-nested-blocks
- "10"
- --max-branches
- "16"
- --max-statements
- "100"
- --min-similarity-lines
- "30"
- --disable=C0301
- --disable=C0330
- --disable=C0413
- --disable=C0415
- --disable=E0401
- --disable=E0501
- --disable=E0611
- --disable=E1101
- --disable=E1121
- --disable=I1101
- --disable=R0914
- --disable=W0511
- --disable=W0603
- --disable=W0604
- --disable=W0703
- --disable=W1202
- --disable=W1203
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.770
hooks:
- id: mypy
args:
- --no-strict-optional
- --ignore-missing-imports
- --scripts-are-modules
- --follow-imports=skip
- --disallow-untyped-defs
- --show-error-codes
additional_dependencies: [tokenize-rt==3.2.0]
types: [python]
- repo: https://github.com/pycqa/pydocstyle
rev: 4.0.0
hooks:
- id: pydocstyle
# language: system
language_version: python
types: [python]
args:
- --ignore=D212,D203
- repo: local
hooks:
- id: tests
name: run pytests
entry: python -m pytest -v --hypothesis-show-statistics
language: system
# language_version: python
types: [python]
files: ^python/glsuplib/tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment