Skip to content

Commit

Permalink
Add mypy hook to pre-commit config
Browse files Browse the repository at this point in the history
  • Loading branch information
atugushev committed Oct 26, 2019
1 parent 02fb529 commit c17a505
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@ repos:
- id: bandit
language_version: python3
exclude: ^tests/
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.740
hooks:
- id: mypy
language_version: python3
# To prevent "Duplicate module named 'setup'" error
exclude: ^tests/test_data/packages/
7 changes: 7 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,10 @@ line_length = 88
multi_line_output = 3
default_section=THIRDPARTY
known_first_party = piptools, tests, examples

[mypy]
follow_imports = silent
ignore_missing_imports = True

[mypy-tests.*]
ignore_errors = True

0 comments on commit c17a505

Please sign in to comment.