Issue 355 (#376)

* Mapping instead of Dict type annotation for context in render() with test

* removed Union and Context

* typo

Co-authored-by: Kacper Szmigiel <szmigielkacper@gmai.com>
This commit is contained in:
KacperandKacper Szmigiel authored and GitHub committed 2020-06-01 19:41:57 +03:00
1 parent 570772f973
commit 8d2600136a
2 files changed
+16 -3

No files matched your search

+3 -3
View File
@@ -1,4 +1,4 @@
from typing import Any, Callable, Dict, List, Optional, Protocol, Sequence, Type, TypeVar, Union
from typing import Any, Callable, List, Mapping, Optional, Protocol, Sequence, Type, TypeVar, Union
from django.db.models.base import Model
from django.http.response import (
@@ -12,7 +12,7 @@ from django.http import HttpRequest
def render_to_response(
template_name: Union[str, Sequence[str]],
context: Optional[Dict[str, Any]] = ...,
context: Optional[Mapping[str, Any]] = ...,
content_type: Optional[str] = ...,
status: Optional[int] = ...,
using: Optional[str] = ...,
@@ -20,7 +20,7 @@ def render_to_response(
def render(
request: HttpRequest,
template_name: Union[str, Sequence[str]],
context: Optional[Dict[str, Any]] = ...,
context: Optional[Mapping[str, Any]] = ...,
content_type: Optional[str] = ...,
status: Optional[int] = ...,
using: Optional[str] = ...,