Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #46 from TezRomacH/mypy-config
Browse files Browse the repository at this point in the history
⚡ Upgraged mypy config
  • Loading branch information
TezRomacH authored May 28, 2020
2 parents fad8753 + 0d9ee31 commit aadd8ec
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
exclude: ^{{ cookiecutter.project_name }}/

- repo: https://github.com/asottile/pyupgrade
rev: v2.4.1
rev: v2.4.4
hooks:
- id: pyupgrade
exclude: ^{{ cookiecutter.project_name }}/
Expand Down
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ docstring_style = google
[mypy]
# mypy configurations: http://bit.ly/2zEl9WI
python_version = 3.7
pretty = True
allow_redefinition = False
check_untyped_defs = True
disallow_any_generics = True
disallow_incomplete_defs = True
ignore_missing_imports = True
implicit_reexport = False
strict_optional = True
Expand All @@ -26,6 +28,8 @@ warn_unused_configs = True
warn_return_any = True
warn_unreachable = True
show_error_codes = True
show_column_numbers = True
show_error_context = True

[tool:pytest]
# Directories that are not visited by pytest collector:
Expand Down
2 changes: 1 addition & 1 deletion {{ cookiecutter.project_name }}/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
additional_dependencies: [tomlkit, toml]

- repo: https://github.com/asottile/pyupgrade
rev: v2.4.1
rev: v2.4.4
hooks:
- id: pyupgrade
args: [--py37-plus]
Expand Down
2 changes: 1 addition & 1 deletion {{ cookiecutter.project_name }}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pre-commit = "^2.4.0"
[tool.poetry.dev-dependencies]
darglint = "^1.3.0"
isort = "^4.3.21"
pyupgrade = "^2.4.1"
pyupgrade = "^2.4.4"
black = "^19.10b0"
mypy = "^0.770"
bandit = "^1.6.2"
Expand Down
10 changes: 10 additions & 0 deletions {{ cookiecutter.project_name }}/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ docstring_style = google
[mypy]
# mypy configurations: http://bit.ly/2zEl9WI
python_version = 3.7
pretty = True
allow_redefinition = False
check_untyped_defs = True
disallow_any_generics = True
disallow_incomplete_defs = True
ignore_missing_imports = True
implicit_reexport = False
strict_optional = True
Expand All @@ -26,6 +28,14 @@ warn_unused_configs = True
warn_return_any = True
warn_unreachable = True
show_error_codes = True
show_column_numbers = True
show_error_context = True

# plugins = pydantic.mypy, sqlmypy

# [pydantic-mypy]
# init_typed = True
# warn_untyped_fields = True

[tool:pytest]
# Directories that are not visited by pytest collector:
Expand Down

0 comments on commit aadd8ec

Please sign in to comment.