-
Notifications
You must be signed in to change notification settings - Fork 38
/
.mypy.ini
37 lines (30 loc) · 1.19 KB
/
.mypy.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
[mypy]
# https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options
strict = True
warn_return_any = False
ignore_missing_imports = True
[mypy-api.models.*]
# Cannot seem to get flask-sqlalchemy db.Model subclassing to work with mypy
# This didn't work https://stackoverflow.com/a/67578171
disallow_subclassing_any = False
[mypy-api.views.resources.*]
# flask_apispec MethodResource is not typed
disallow_subclassing_any = False
# marshmallow-sqlalchemy SQLAlchemyAutoSchema constructors are not typed
disallow_untyped_calls = False
[mypy-api.views.schemas.*]
# marshmallow-sqlalchemy SQLAlchemyAutoSchema constructors are not typed
disallow_untyped_calls = False
[mypy-api.extensions]
# flask_restful Api is not typed
disallow_subclassing_any = False
[mypy-tests.factories]
# Tried using types-factory-boy, but ran into "TypeError: type 'Factory' is not subscriptable" errors
disallow_subclassing_any = False
[mypy-migrations.*]
# Don't require typing from auto-generated Alembic migrations
disallow_untyped_calls = False
disallow_untyped_defs = False
# Known issue with mypy and Flask-SQLAlchemy https://github.com/python/mypy/issues/8603
[mypy-flask_sqlalchemy.*]
follow_imports=skip