Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Bump up Mypy to v0.900 #24

Merged
merged 4 commits into from
Jun 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ repos:
language_version: python3

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.800
rev: v0.901
hooks:
- id: mypy
name: "Python types analyzer (source)"
args: ["--allow-redefinition", "--ignore-missing-imports", "--cache-dir=/dev/null", "src"]
args: ["src"]
language: python
pass_filenames: false
additional_dependencies: ["click ~= 8.0.0"]
- id: mypy
name: "Python types analyzer (tests)"
args: ["--allow-redefinition", "--ignore-missing-imports", "--cache-dir=/dev/null", "tests"]
args: ["tests"]
language: python
pass_filenames: false
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ COV_CONFIG = ".coveragerc"
SOURCE_FOLDER = "src"
TESTS_FOLDER = "tests"
TESTS_PARAMS = "-p no:cacheprovider"
TYPING_PARAMS = "--allow-redefinition --ignore-missing-imports --cache-dir=/dev/null"


.PHONY: check
Expand All @@ -12,8 +11,8 @@ check:
@black --check $(SOURCE_FOLDER)
@black --check $(TESTS_FOLDER)
@echo "Checking type annotations"
@mypy "$(TYPING_PARAMS)" $(SOURCE_FOLDER)
@mypy "$(TYPING_PARAMS)" $(TESTS_FOLDER)
@mypy $(SOURCE_FOLDER)
@mypy $(TESTS_FOLDER)


.PHONY: tag
Expand Down
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File containing Black formatting options
# Black formatting options
[tool.black]
line-length = 100
target-version = ['py37']
Expand All @@ -19,3 +19,9 @@ exclude = '''
)/
)
'''

# Mypy validation options
[tool.mypy]
cache_dir = "/dev/null"
allow_redefinition = true
ignore_missing_imports = true
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
DEVELOPMENT_REQS = [
"black>=21.4b0",
"coverage>=5.0.4",
"mypy==0.800",
"pre-commit>=2.10.0",
"mypy==0.901",
"pre-commit>=2.13.0",
"pytest>=6.2.2",
"pytest-cov>=2.10.0",
]
Expand Down