-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/description-attributes'
- Loading branch information
Showing
5 changed files
with
130 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,43 @@ | ||
from typing import Any | ||
|
||
def html_attribute(attribute_name: str, default: Any = ...) -> property: ... | ||
def boolean_html_attribute(attribute_name: str) -> property: ... | ||
def int_html_attribute(attribute_name: str, default: Any = ...) -> property: ... | ||
def float_html_attribute(attribute_name: str, default: Any = ...) -> property: ... | ||
def time_html_attribute(attribute_name: str, default: Any = ...) -> property: ... | ||
def list_html_attribute(attribute_name: str) -> property: ... | ||
def data_attribute(data_name: str, default: Any = ...) -> property: ... | ||
def css_class_attribute(css_class: str) -> property: ... | ||
import datetime | ||
from typing import Optional, List, Iterable | ||
|
||
from htmlgen.element import Element | ||
|
||
|
||
class html_attribute(object): | ||
def __init__(self, attribute_name: str, default: Optional[str] = ...) -> None: ... | ||
def __get__(self, obj: Element, type: Optional[type] = ...) -> Optional[str]: ... | ||
def __set__(self, obj: Element, value: Optional[str]) -> None: ... | ||
|
||
class boolean_html_attribute(object): | ||
def __init__(self, attribute_name: str) -> None: ... | ||
def __get__(self, obj: Element, type_: Optional[type] = ...) -> bool: ... | ||
def __set__(self, obj: Element, value: bool) -> None: ... | ||
|
||
class int_html_attribute(object): | ||
def __init__(self, attribute_name: str, default: Optional[int] = ...) -> None: ... | ||
def __get__(self, obj: Element, type_: Optional[type] = ...) -> Optional[int]: ... | ||
def __set__(self, obj: Element, value: Optional[int]) -> None: ... | ||
|
||
class float_html_attribute(object): | ||
def __init__(self, attribute_name: str, default: Optional[float] = ...) -> None: ... | ||
def __get__(self, obj: Element, type_: Optional[type] = ...) -> Optional[float]: ... | ||
def __set__(self, obj: Element, value: Optional[float]) -> None: ... | ||
|
||
class time_html_attribute(object): | ||
def __init__(self, attribute_name: str, default: Optional[datetime.time] = None) -> None: ... | ||
def __get__(self, obj: Element, type_: Optional[type] = ...) -> Optional[datetime.time]: ... | ||
def __set__(self, obj: Element, value: Optional[datetime.time]) -> None: ... | ||
|
||
class list_html_attribute(object): | ||
def __init__(self, attribute_name: str) -> None: ... | ||
def __get__(self, obj: Element, type_: Optional[type] = ...) -> List[str]: ... | ||
def __set__(self, obj: Element, value: Iterable[str]) -> None: ... | ||
|
||
class data_attribute(html_attribute): | ||
def __init__(self, data_name: str, default: Optional[str] = None) -> None: ... | ||
|
||
class css_class_attribute(object): | ||
def __init__(self, css_class: str) -> None: ... | ||
def __get__(self, obj: Element, type_: Optional[type] = ...) -> bool: ... | ||
def __set__(self, obj: Element, value: bool) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters