Skip to content

Instantly share code, notes, and snippets.

@ramdesh
Last active September 16, 2024 20:12
Show Gist options
  • Save ramdesh/2d2530a0f1bba0806b43bdb26d326167 to your computer and use it in GitHub Desktop.
Save ramdesh/2d2530a0f1bba0806b43bdb26d326167 to your computer and use it in GitHub Desktop.
pre-commit config yaml
[flake8]
max-line-length = 100
ignore = E203,W503,W605
repos:
- repo: https://github.com/ambv/black
rev: stable
hooks:
- id: black
language_version: python3.6
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
hooks:
- id: trailing-whitespace
- id: check-json
- id: check-yaml
- id: flake8
- id: end-of-file-fixer
- id: pretty-format-json
args: [--autofix, --indent, '4']
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.701
hooks:
- id: mypy
- repo: https://github.com/asottile/reorder_python_imports
rev: v1.4.0
hooks:
- id: reorder-python-imports
pip install pre-commit
pre-commit install
[tool.black]
line-length = 79
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment