Skip to content

Commit 535a9e8

Browse files
committed
typing
1 parent 7f8d785 commit 535a9e8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sentry_sdk/integrations/django/templates.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from typing import Optional
1717
from typing import Iterator
1818
from typing import Tuple
19+
from typing import Union
1920

2021
try:
2122
# support Django 1.9
@@ -58,11 +59,13 @@ def _get_template_name_description(template_name):
5859

5960

6061
def _normalize_context(context):
61-
# type: (Dict[str, Any]) -> Dict[str, Any]
62+
# type: (Dict[str, Any]) -> Dict[str, Union[str, int, float, bool, type(None), list[Union[str, int, float, bool, type(None)]], dict[str, Union[str, int, float, bool, type(None)]]]]
6263
"""
6364
Filter out non-primitive types from `context`.
6465
"""
65-
new_context = {}
66+
new_context = (
67+
{}
68+
) # type: Dict[str, Union[str, int, float, bool, type(None), list[Union[str, int, float, bool, type(None)]], dict[str, Union[str, int, float, bool, type(None)]]]]
6669
for key, value in context.items():
6770
if isinstance(value, list):
6871
new_context[key] = [

0 commit comments

Comments
 (0)