dev: pre-commit config

This commit is contained in:
2021-01-07 22:34:27 +03:00
parent 164400efec
commit 143f0a566f
2 changed files with 36 additions and 0 deletions

13
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,13 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.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: 20.8b1
hooks:
- id: black
language_version: python3 # Should be a command that runs python3.6+

23
pyproject.toml Normal file
View File

@@ -0,0 +1,23 @@
[tool.black]
line-length = 100
target-version = ['py38']
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
# The following are specific to Black, you probably don't want those.
| blib2to3
| tests/data
| profiling
)/
'''