Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Update mypy setup and add mypy check to pre-commit config

IKarbowiakeb8538b3544e
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 1e8bae85ac..2b220b4e85 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -35,6 +35,12 @@ repos:
files: ^saleor/static/*.*\.js$
verbose: true
+ - repo: https://github.com/pre-commit/mirrors-mypy
+ rev: v0.761
+ hooks:
+ - id: mypy
+ language: system
+
- repo: local
hooks:
- id: migrations-check
diff --git a/setup.cfg b/setup.cfg
index daacca1c73..155554b9ff 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -64,6 +64,10 @@ known_third_party =
[mypy]
+ignore_missing_imports = True
+allow_untyped_globals = True
+allow_redefinition = True
+
plugins =
mypy_django_plugin.main