Last active
April 6, 2019 12:30
-
-
Save gmcabrita/9e6d57a1f5e009c044a1381894fc4ac7 to your computer and use it in GitHub Desktop.
Python project setup.
This file contains hidden or 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
ignore = W503 | |
max-line-length = 79 | |
max-complexity = 18 | |
select = B,C,E,F,W,T4,B9 |
This file contains hidden or 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 | |
combine_as_imports=True | |
line_length=79 |
This file contains hidden or 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
default_language_version: | |
python: python3.7 | |
repos: | |
- repo: https://github.com/ambv/black | |
rev: stable | |
hooks: | |
- id: black | |
- repo: https://github.com/pre-commit/mirrors-isort | |
rev: master | |
hooks: | |
- id: isort | |
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: master | |
hooks: | |
- id: flake8 | |
- id: requirements-txt-fixer | |
- id: trailing-whitespace | |
- repo: https://github.com/pre-commit/mirrors-mypy | |
rev: master | |
hooks: | |
- id: mypy |
This file contains hidden or 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
[mypy] | |
# Specify the target platform details in config, so your developers are | |
# free to run mypy on Windows, Linux, or macOS and get consistent | |
# results. | |
python_version=3.7 | |
platform=linux | |
# flake8-mypy expects the two following for sensible formatting | |
show_column_numbers=True | |
# show error messages from unrelated files | |
follow_imports=normal | |
# suppress errors about unsatisfied imports | |
ignore_missing_imports=True | |
# be strict | |
disallow_untyped_calls=True | |
warn_return_any=True | |
strict_optional=True | |
warn_no_return=True | |
warn_redundant_casts=True | |
warn_unused_ignores=True | |
warn_incomplete_stub=True | |
strict_equality=True | |
disallow_untyped_defs=True | |
check_untyped_defs=True |
This file contains hidden or 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 = 79 | |
target-version=["py37"] | |
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