Skip to content
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
28 changes: 28 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[mypy]
warn_return_any=true
disallow_untyped_calls=true
exclude = ^(migrations|.*manage\.py)$ # 排除 migrations 資料夾和 manage.py 檔案

# 以下設定皆來自 https://github.com/typeddjango/django-stubs/blob/master/mypy.ini
allow_redefinition = true
check_untyped_defs = true
ignore_missing_imports = true
incremental = true
strict_optional = true
show_traceback = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unreachable = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
disable_error_code = empty-body
# TODO: update our output assertions to match a new syntax
force_uppercase_builtins = true
force_union_syntax = true

plugins =
mypy_django_plugin.main

[mypy.plugins.django-stubs]
django_settings_module = DjangoTutorial.settings
Loading