renderer = BaseRenderer instead of EngineMixin in Widget.render() (#481)

This commit is contained in:
Mariam Maarouf
2020-10-07 19:19:12 +02:00
committed by GitHub
parent 645ee97e78
commit 2a732fd257

View File

@@ -3,7 +3,7 @@ from itertools import chain
from typing import Any, Callable, Dict, Iterable, Iterator, List, Mapping, Optional, Sequence, Set, Tuple, Type, Union
from django.core.files.base import File
from django.forms.renderers import EngineMixin
from django.forms.renderers import BaseRenderer
from django.utils.safestring import SafeText
_OptAttrs = Dict[str, Any]
@@ -42,7 +42,7 @@ class Widget:
def format_value(self, value: Any) -> Optional[str]: ...
def get_context(self, name: str, value: Any, attrs: Optional[_OptAttrs]) -> Dict[str, Any]: ...
def render(
self, name: str, value: Any, attrs: Optional[_OptAttrs] = ..., renderer: Optional[EngineMixin] = ...
self, name: str, value: Any, attrs: Optional[_OptAttrs] = ..., renderer: Optional[BaseRenderer] = ...
) -> SafeText: ...
def build_attrs(
self, base_attrs: _OptAttrs, extra_attrs: Optional[_OptAttrs] = ...