-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogramming.py
More file actions
102 lines (87 loc) · 2.56 KB
/
Copy pathprogramming.py
File metadata and controls
102 lines (87 loc) · 2.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
import typing as t
from py_html.el.base import BaseElement, BaseHTML
class Script(BaseElement):
tag = "script"
def __init__(
self,
*content,
async_: t.Optional[bool] = None,
cross_origin: t.Optional[t.Literal["anonymous", "use-credentials"]] = None,
no_module: t.Optional[t.Literal["true", "false"]] = None,
defer: t.Optional[bool] = None,
integrity: t.Optional[str] = None,
src: t.Optional[str] = None,
type: t.Optional[str] = None,
referrer_policy: t.Optional[
t.Literal[
"no-referrer",
"no-referrer-when-downgrade",
"origin",
"origin-when-cross-origin",
"same-origin",
"strict-origin-when-cross-origin",
"unsafe-url",
]
] = None,
**attrs,
) -> None:
attrs.update(
{
"async": async_,
}
)
super().__init__(
*content,
nomodule=no_module,
crossorigin=cross_origin,
defer=defer,
integrity=integrity,
src=src,
referrerpolicy=referrer_policy,
type=type,
**attrs,
)
class NoScript(BaseElement):
tag = "noscript"
class Embed(BaseHTML):
tag = "embed"
def __init__(
self,
height: t.Optional[t.Any] = None,
width: t.Optional[t.Any] = None,
src: t.Optional[str] = None,
type: t.Optional[str] = None,
**attrs,
) -> None:
super().__init__(height=height, width=width, src=src, type=type, **attrs)
class Object(BaseHTML):
tag = "object"
def __init__(
self,
height: t.Optional[t.Any] = None,
width: t.Optional[t.Any] = None,
src: t.Optional[str] = None,
name: t.Optional[str] = None,
form: t.Optional[str] = None,
data: t.Optional[str] = None,
type: t.Optional[str] = None,
type_must_match: t.Optional[t.Literal["false", "true"]] = None,
**attrs,
) -> None:
super().__init__(
height=height,
width=width,
src=src,
type=type,
name=name,
form=form,
data=data,
typemustmatch=type_must_match,
**attrs,
)
class Param(BaseHTML):
tag = "param"
def __init__(
self, name: t.Optional[str] = None, value: t.Optional[str] = None, **attrs
) -> None:
super().__init__(name=name, value=value, **attrs)