Fix boundfield method parameters (#741)

This commit is contained in:
Chris Beaven
2021-10-27 00:34:08 +13:00
committed by GitHub
parent 95060b54c2
commit 640553dcd7

View File

@@ -1,4 +1,4 @@
from typing import Any, Dict, List, Optional, Union from typing import Any, Dict, Iterable, List, Optional, Union
from django.forms.fields import Field from django.forms.fields import Field
from django.forms.forms import BaseForm from django.forms.forms import BaseForm
@@ -25,17 +25,19 @@ class BoundField:
def __getitem__(self, idx: Union[int, slice, str]) -> Union[List[BoundWidget], BoundWidget]: ... def __getitem__(self, idx: Union[int, slice, str]) -> Union[List[BoundWidget], BoundWidget]: ...
@property @property
def errors(self) -> ErrorList: ... def errors(self) -> ErrorList: ...
def as_widget(self, widget: Optional[Widget] = ..., attrs: None = ..., only_initial: bool = ...) -> SafeText: ... def as_widget(
def as_text(self, attrs: None = ..., **kwargs: Any) -> SafeText: ... self, widget: Optional[Widget] = ..., attrs: Optional[Dict[str, str]] = ..., only_initial: bool = ...
def as_textarea(self, attrs: None = ..., **kwargs: Any) -> SafeText: ... ) -> SafeText: ...
def as_hidden(self, attrs: None = ..., **kwargs: Any) -> SafeText: ... def as_text(self, attrs: Optional[Dict[str, str]] = ..., **kwargs: Any) -> SafeText: ...
def as_textarea(self, attrs: Optional[Dict[str, str]] = ..., **kwargs: Any) -> SafeText: ...
def as_hidden(self, attrs: Optional[Dict[str, str]] = ..., **kwargs: Any) -> SafeText: ...
@property @property
def data(self) -> Any: ... def data(self) -> Any: ...
def value(self) -> Any: ... def value(self) -> Any: ...
def label_tag( def label_tag(
self, contents: Optional[str] = ..., attrs: Optional[Dict[str, str]] = ..., label_suffix: Optional[str] = ... self, contents: Optional[str] = ..., attrs: Optional[Dict[str, str]] = ..., label_suffix: Optional[str] = ...
) -> SafeText: ... ) -> SafeText: ...
def css_classes(self, extra_classes: None = ...) -> str: ... def css_classes(self, extra_classes: Union[str, Iterable[str], None] = ...) -> str: ...
@property @property
def is_hidden(self) -> bool: ... def is_hidden(self) -> bool: ...
@property @property