mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-14 15:57:08 +08:00
run black over stubs, add checking to travis
This commit is contained in:
@@ -7,7 +7,6 @@ from django.forms.utils import ErrorList
|
||||
from django.forms.widgets import Widget
|
||||
from django.utils.safestring import SafeText
|
||||
|
||||
|
||||
class BoundField:
|
||||
initial: Any
|
||||
form: django.forms.forms.BaseForm = ...
|
||||
@@ -23,17 +22,10 @@ class BoundField:
|
||||
def __bool__(self) -> bool: ...
|
||||
def __iter__(self): ...
|
||||
def __len__(self) -> int: ...
|
||||
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
|
||||
def errors(self) -> ErrorList: ...
|
||||
def as_widget(
|
||||
self,
|
||||
widget: Optional[Widget] = ...,
|
||||
attrs: None = ...,
|
||||
only_initial: bool = ...,
|
||||
) -> SafeText: ...
|
||||
def as_widget(self, widget: Optional[Widget] = ..., attrs: None = ..., only_initial: bool = ...) -> SafeText: ...
|
||||
def as_text(self, attrs: None = ..., **kwargs: Any) -> SafeText: ...
|
||||
def as_textarea(self, attrs: None = ..., **kwargs: Any) -> SafeText: ...
|
||||
def as_hidden(self, attrs: None = ..., **kwargs: Any) -> SafeText: ...
|
||||
@@ -41,10 +33,7 @@ class BoundField:
|
||||
def data(self) -> Any: ...
|
||||
def value(self) -> Any: ...
|
||||
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: ...
|
||||
def css_classes(self, extra_classes: None = ...) -> str: ...
|
||||
@property
|
||||
@@ -54,15 +43,11 @@ class BoundField:
|
||||
@property
|
||||
def id_for_label(self) -> str: ...
|
||||
def initial(self) -> Any: ...
|
||||
def build_widget_attrs(
|
||||
self, attrs: Dict[str, str], widget: Optional[Widget] = ...
|
||||
) -> Dict[str, Union[bool, str]]: ...
|
||||
def build_widget_attrs(self, attrs: Dict[str, str], widget: Optional[Widget] = ...) -> Dict[str, Union[bool, str]]: ...
|
||||
|
||||
class BoundWidget:
|
||||
parent_widget: django.forms.widgets.Widget = ...
|
||||
data: Dict[
|
||||
str, Optional[Union[Dict[str, Union[bool, str]], int, str]]
|
||||
] = ...
|
||||
data: Dict[str, Optional[Union[Dict[str, Union[bool, str]], int, str]]] = ...
|
||||
renderer: django.forms.renderers.DjangoTemplates = ...
|
||||
def __init__(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user