Skip to content

Commit bd1df9b

Browse files
committed
Add initial mypy config
1 parent a8537fb commit bd1df9b

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

requirements/base.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ django-environ==0.8.1
33
psycopg2==2.9.3
44
djangorestframework==3.13.1
55

6+
mypy==0.931
7+
django-stubs==1.9.0
8+
djangorestframework-stubs==1.4.0
9+
610
celery==5.2.3
711
django-celery-results==2.2.0
812
django-celery-beat==2.2.1

setup.cfg

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,39 @@ exclude =
44
.git,
55
__pycache__,
66
*/migrations/*
7+
8+
[mypy]
9+
plugins =
10+
mypy_django_plugin.main,
11+
mypy_drf_plugin.main
12+
13+
[mypy.plugins.django-stubs]
14+
django_settings_module = "config.django.base"
15+
16+
[mypy-config.*]
17+
# Ignore everything related to Django config
18+
19+
ignore_errors = true
20+
[mypy-styleguide_example.*.migrations.*]
21+
# Ignore Django migrations
22+
ignore_errors = true
23+
24+
[mypy-celery.*]
25+
# Remove this when celery stubs are present
26+
ignore_missing_imports = True
27+
28+
[mypy-django_celery_beat.*]
29+
# Remove this when django_celery_beat stubs are present
30+
ignore_missing_imports = True
31+
32+
[mypy-django_filters.*]
33+
# Remove this when django_filters stubs are present
34+
ignore_missing_imports = True
35+
36+
[mypy-factory.*]
37+
# Remove this when factory stubs are present
38+
ignore_missing_imports = True
39+
40+
[mypy-rest_framework_jwt.*]
41+
# Remove this when rest_framework_jwt stubs are present
42+
ignore_missing_imports = True

0 commit comments

Comments
 (0)