Last active
June 24, 2021 18:05
-
-
Save piotrgredowski/c30afc43c23c6787b09a4bd9641d4a92 to your computer and use it in GitHub Desktop.
My default setup for python tools
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
[run] | |
omit = **/test_*.py |
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 = 120 | |
; Creating issue with black and E203 and E712 not compatible | |
; TODO: remove C901 from ignored when we have time for refactoring | |
ignore = D203,W503,E203,E712,C901,E231 | |
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist,venv | |
max-complexity = 10 |
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: local | |
hooks: | |
- id: isort | |
name: isort | |
entry: isort | |
require_serial: true | |
language: python | |
language_version: python3 | |
types_or: [cython, pyi, python] | |
args: ['--filter-files'] | |
minimum_pre_commit_version: '2.9.0' | |
- id: black | |
name: black | |
language: system | |
entry: black | |
require_serial: true | |
types: [python] | |
- id: flake8 | |
name: flake8 | |
language: system | |
entry: flake8 | |
require_serial: true | |
types: [python] | |
- id: pyright | |
name: pyright | |
language: system | |
entry: pyright | |
require_serial: true | |
types: [python] | |
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
[tool.black] | |
line-length = 120 | |
target-version = ['py38'] | |
include = '\.pyi?$' | |
exclude = ''' | |
( | |
/( | |
\.eggs | |
| \.git | |
| \.hg | |
| \.mypy_cache | |
| \.tox | |
| \venv | |
| \.venv | |
| _build | |
| buck-out | |
| build | |
| dist | |
)/ | |
) | |
''' | |
[tool.isort] | |
line_length = 120 | |
multi_line_output = 3 | |
include_trailing_comma = 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
{ | |
"exclude": [ | |
"**/test*.py", | |
"venv", | |
".venv" | |
], | |
"pythonVersion": "3.9", | |
"pythonPlatform": "Linux" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment