Add mypy to GitLab CI

This commit is contained in:
Iain Learmonth 2022-05-15 16:56:31 +00:00 committed by Iain Learmonth
parent 552dfd7937
commit f495b1d079
3 changed files with 40 additions and 1 deletions

27
mypy.ini Normal file
View file

@ -0,0 +1,27 @@
[mypy]
; Ensure full coverage
disallow_untyped_calls = True
disallow_untyped_defs = True
disallow_incomplete_defs = True
disallow_untyped_decorators = True
check_untyped_defs = True
; Restrict dynamic typing
disallow_any_generics = True
disallow_subclassing_any = True
warn_return_any = True
; Know exactly what you're doing
warn_redundant_casts = True
warn_unused_ignores = True
warn_unused_configs = True
warn_unreachable = True
show_error_codes = True
; Explicit is better than implicit
no_implicit_optional = True
; Some libraries don't have hints yet
ignore_missing_imports = True
follow_imports = silent