-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add type hints & configure mypy. (#54)
- Loading branch information
Showing
8 changed files
with
88 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
[build-system] | ||
requires = ["setuptools>=38.6.0", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.mypy] | ||
warn_unused_configs = true | ||
strict = false | ||
warn_return_any = true | ||
follow_imports = "normal" | ||
show_error_codes = true | ||
disallow_untyped_defs = true | ||
ignore_missing_imports = true | ||
warn_unreachable = true | ||
no_implicit_optional = true | ||
files = [ | ||
"render_block", | ||
"tests", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
from typing import NoReturn | ||
|
||
from django import template | ||
|
||
register = template.Library() | ||
|
||
|
||
@register.simple_tag() | ||
def raise_exception(): | ||
def raise_exception() -> NoReturn: | ||
raise Exception("Exception raised in template tag.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters