-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Typing stub package for dominate (#5)
Provides types internally used from dominate to increase mypy coverage
- Loading branch information
Showing
16 changed files
with
113 additions
and
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ ignore = | |
B902 | ||
max-line-length = 120 | ||
min_python_version = 3.11 | ||
exclude = src/dominate-stubs |
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
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
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
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
Empty file.
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from typing import Any | ||
from typing import overload | ||
from typing import Iterator | ||
from typing import Self | ||
|
||
class dom_tag: | ||
attributes: dict[str, str] | ||
def __init__(self, *args: Any, **kwargs: Any) -> None: ... | ||
@overload | ||
def __getitem__(self, key: str) -> str: ... | ||
@overload | ||
def __getitem__(self, key: int) -> "Self": ... | ||
def __setitem__(self, key: str, value: str) -> None: ... | ||
def add(self, *args: str | int | "dom_tag") -> "dom_tag": ... | ||
def remove(self, *args: "dom_tag") -> "dom_tag": ... | ||
def clear(self) -> None: ... | ||
def __len__(self) -> int: ... | ||
def __iter__(self) -> "Iterator[dom_tag]": ... | ||
def render(self) -> str: ... |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from .dom_tag import dom_tag | ||
|
||
class svg(dom_tag): ... | ||
class use(dom_tag): ... |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
from typing import Iterator | ||
|
||
from .dom_tag import dom_tag | ||
|
||
class Classes: | ||
def __contains__(self, cls: str) -> bool: ... | ||
def __len__(self) -> int: ... | ||
def __iter__(self) -> Iterator[str]: ... | ||
def add(self, *classes: str) -> "html_tag": ... | ||
def remove(self, *classes: str) -> "html_tag": ... | ||
def swap(self, old: str, new: str) -> "html_tag": ... | ||
|
||
class html_tag(dom_tag): | ||
@property | ||
def classes(self) -> Classes: ... | ||
|
||
class a(html_tag): ... | ||
class button(html_tag): ... | ||
class div(html_tag): ... | ||
class form(html_tag): ... | ||
class hr(html_tag): ... | ||
class img(html_tag): ... | ||
class input_(html_tag): ... | ||
class label(html_tag): ... | ||
class li(html_tag): ... | ||
class nav(html_tag): ... | ||
class ol(html_tag): ... | ||
class span(html_tag): ... | ||
class table(html_tag): ... | ||
class tbody(html_tag): ... | ||
class td(html_tag): ... | ||
class th(html_tag): ... | ||
class thead(html_tag): ... | ||
class tr(html_tag): ... | ||
class ul(html_tag): ... | ||
class comment(dom_tag): ... |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from .dom_tag import dom_tag | ||
|
||
class container(dom_tag): ... | ||
class text(dom_tag): ... |