Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
default_styles.py
Go to the documentation of this file.
1
from
typing
import
Dict
2
3
from
.style
import
Style
4
5
DEFAULT_STYLES: Dict[str, Style] = {
6
"none"
:
Style.null
(),
7
"reset"
:
Style
(
8
color=
"default"
,
9
bgcolor=
"default"
,
10
dim=
False
,
11
bold=
False
,
12
italic=
False
,
13
underline=
False
,
14
blink=
False
,
15
blink2=
False
,
16
reverse=
False
,
17
conceal=
False
,
18
strike=
False
,
19
),
20
"dim"
:
Style
(dim=
True
),
21
"bright"
:
Style
(dim=
False
),
22
"bold"
:
Style
(bold=
True
),
23
"strong"
:
Style
(bold=
True
),
24
"code"
:
Style
(reverse=
True
, bold=
True
),
25
"italic"
:
Style
(italic=
True
),
26
"emphasize"
:
Style
(italic=
True
),
27
"underline"
:
Style
(underline=
True
),
28
"blink"
:
Style
(blink=
True
),
29
"blink2"
:
Style
(blink2=
True
),
30
"reverse"
:
Style
(reverse=
True
),
31
"strike"
:
Style
(strike=
True
),
32
"black"
:
Style
(color=
"black"
),
33
"red"
:
Style
(color=
"red"
),
34
"green"
:
Style
(color=
"green"
),
35
"yellow"
:
Style
(color=
"yellow"
),
36
"magenta"
:
Style
(color=
"magenta"
),
37
"cyan"
:
Style
(color=
"cyan"
),
38
"white"
:
Style
(color=
"white"
),
39
"inspect.attr"
:
Style
(color=
"yellow"
, italic=
True
),
40
"inspect.attr.dunder"
:
Style
(color=
"yellow"
, italic=
True
, dim=
True
),
41
"inspect.callable"
:
Style
(bold=
True
, color=
"red"
),
42
"inspect.async_def"
:
Style
(italic=
True
, color=
"bright_cyan"
),
43
"inspect.def"
:
Style
(italic=
True
, color=
"bright_cyan"
),
44
"inspect.class"
:
Style
(italic=
True
, color=
"bright_cyan"
),
45
"inspect.error"
:
Style
(bold=
True
, color=
"red"
),
46
"inspect.equals"
:
Style
(),
47
"inspect.help"
:
Style
(color=
"cyan"
),
48
"inspect.doc"
:
Style
(dim=
True
),
49
"inspect.value.border"
:
Style
(color=
"green"
),
50
"live.ellipsis"
:
Style
(bold=
True
, color=
"red"
),
51
"layout.tree.row"
:
Style
(dim=
False
, color=
"red"
),
52
"layout.tree.column"
:
Style
(dim=
False
, color=
"blue"
),
53
"logging.keyword"
:
Style
(bold=
True
, color=
"yellow"
),
54
"logging.level.notset"
:
Style
(dim=
True
),
55
"logging.level.debug"
:
Style
(color=
"green"
),
56
"logging.level.info"
:
Style
(color=
"blue"
),
57
"logging.level.warning"
:
Style
(color=
"red"
),
58
"logging.level.error"
:
Style
(color=
"red"
, bold=
True
),
59
"logging.level.critical"
:
Style
(color=
"red"
, bold=
True
, reverse=
True
),
60
"log.level"
:
Style.null
(),
61
"log.time"
:
Style
(color=
"cyan"
, dim=
True
),
62
"log.message"
:
Style.null
(),
63
"log.path"
:
Style
(dim=
True
),
64
"repr.ellipsis"
:
Style
(color=
"yellow"
),
65
"repr.indent"
:
Style
(color=
"green"
, dim=
True
),
66
"repr.error"
:
Style
(color=
"red"
, bold=
True
),
67
"repr.str"
:
Style
(color=
"green"
, italic=
False
, bold=
False
),
68
"repr.brace"
:
Style
(bold=
True
),
69
"repr.comma"
:
Style
(bold=
True
),
70
"repr.ipv4"
:
Style
(bold=
True
, color=
"bright_green"
),
71
"repr.ipv6"
:
Style
(bold=
True
, color=
"bright_green"
),
72
"repr.eui48"
:
Style
(bold=
True
, color=
"bright_green"
),
73
"repr.eui64"
:
Style
(bold=
True
, color=
"bright_green"
),
74
"repr.tag_start"
:
Style
(bold=
True
),
75
"repr.tag_name"
:
Style
(color=
"bright_magenta"
, bold=
True
),
76
"repr.tag_contents"
:
Style
(color=
"default"
),
77
"repr.tag_end"
:
Style
(bold=
True
),
78
"repr.attrib_name"
:
Style
(color=
"yellow"
, italic=
False
),
79
"repr.attrib_equal"
:
Style
(bold=
True
),
80
"repr.attrib_value"
:
Style
(color=
"magenta"
, italic=
False
),
81
"repr.number"
:
Style
(color=
"cyan"
, bold=
True
, italic=
False
),
82
"repr.number_complex"
:
Style
(color=
"cyan"
, bold=
True
, italic=
False
),
# same
83
"repr.bool_true"
:
Style
(color=
"bright_green"
, italic=
True
),
84
"repr.bool_false"
:
Style
(color=
"bright_red"
, italic=
True
),
85
"repr.none"
:
Style
(color=
"magenta"
, italic=
True
),
86
"repr.url"
:
Style
(underline=
True
, color=
"bright_blue"
, italic=
False
, bold=
False
),
87
"repr.uuid"
:
Style
(color=
"bright_yellow"
, bold=
False
),
88
"repr.call"
:
Style
(color=
"magenta"
, bold=
True
),
89
"repr.path"
:
Style
(color=
"magenta"
),
90
"repr.filename"
:
Style
(color=
"bright_magenta"
),
91
"rule.line"
:
Style
(color=
"bright_green"
),
92
"rule.text"
:
Style.null
(),
93
"json.brace"
:
Style
(bold=
True
),
94
"json.bool_true"
:
Style
(color=
"bright_green"
, italic=
True
),
95
"json.bool_false"
:
Style
(color=
"bright_red"
, italic=
True
),
96
"json.null"
:
Style
(color=
"magenta"
, italic=
True
),
97
"json.number"
:
Style
(color=
"cyan"
, bold=
True
, italic=
False
),
98
"json.str"
:
Style
(color=
"green"
, italic=
False
, bold=
False
),
99
"json.key"
:
Style
(color=
"blue"
, bold=
True
),
100
"prompt"
:
Style.null
(),
101
"prompt.choices"
:
Style
(color=
"magenta"
, bold=
True
),
102
"prompt.default"
:
Style
(color=
"cyan"
, bold=
True
),
103
"prompt.invalid"
:
Style
(color=
"red"
),
104
"prompt.invalid.choice"
:
Style
(color=
"red"
),
105
"pretty"
:
Style.null
(),
106
"scope.border"
:
Style
(color=
"blue"
),
107
"scope.key"
:
Style
(color=
"yellow"
, italic=
True
),
108
"scope.key.special"
:
Style
(color=
"yellow"
, italic=
True
, dim=
True
),
109
"scope.equals"
:
Style
(color=
"red"
),
110
"table.header"
:
Style
(bold=
True
),
111
"table.footer"
:
Style
(bold=
True
),
112
"table.cell"
:
Style.null
(),
113
"table.title"
:
Style
(italic=
True
),
114
"table.caption"
:
Style
(italic=
True
, dim=
True
),
115
"traceback.error"
:
Style
(color=
"red"
, italic=
True
),
116
"traceback.border.syntax_error"
:
Style
(color=
"bright_red"
),
117
"traceback.border"
:
Style
(color=
"red"
),
118
"traceback.text"
:
Style.null
(),
119
"traceback.title"
:
Style
(color=
"red"
, bold=
True
),
120
"traceback.exc_type"
:
Style
(color=
"bright_red"
, bold=
True
),
121
"traceback.exc_value"
:
Style.null
(),
122
"traceback.offset"
:
Style
(color=
"bright_red"
, bold=
True
),
123
"bar.back"
:
Style
(color=
"grey23"
),
124
"bar.complete"
:
Style
(color=
"rgb(249,38,114)"
),
125
"bar.finished"
:
Style
(color=
"rgb(114,156,31)"
),
126
"bar.pulse"
:
Style
(color=
"rgb(249,38,114)"
),
127
"progress.description"
:
Style.null
(),
128
"progress.filesize"
:
Style
(color=
"green"
),
129
"progress.filesize.total"
:
Style
(color=
"green"
),
130
"progress.download"
:
Style
(color=
"green"
),
131
"progress.elapsed"
:
Style
(color=
"yellow"
),
132
"progress.percentage"
:
Style
(color=
"magenta"
),
133
"progress.remaining"
:
Style
(color=
"cyan"
),
134
"progress.data.speed"
:
Style
(color=
"red"
),
135
"progress.spinner"
:
Style
(color=
"green"
),
136
"status.spinner"
:
Style
(color=
"green"
),
137
"tree"
:
Style
(),
138
"tree.line"
:
Style
(),
139
"markdown.paragraph"
:
Style
(),
140
"markdown.text"
:
Style
(),
141
"markdown.em"
:
Style
(italic=
True
),
142
"markdown.emph"
:
Style
(italic=
True
),
# For commonmark backwards compatibility
143
"markdown.strong"
:
Style
(bold=
True
),
144
"markdown.code"
:
Style
(bold=
True
, color=
"cyan"
, bgcolor=
"black"
),
145
"markdown.code_block"
:
Style
(color=
"cyan"
, bgcolor=
"black"
),
146
"markdown.block_quote"
:
Style
(color=
"magenta"
),
147
"markdown.list"
:
Style
(color=
"cyan"
),
148
"markdown.item"
:
Style
(),
149
"markdown.item.bullet"
:
Style
(color=
"yellow"
, bold=
True
),
150
"markdown.item.number"
:
Style
(color=
"yellow"
, bold=
True
),
151
"markdown.hr"
:
Style
(color=
"yellow"
),
152
"markdown.h1.border"
:
Style
(),
153
"markdown.h1"
:
Style
(bold=
True
),
154
"markdown.h2"
:
Style
(bold=
True
, underline=
True
),
155
"markdown.h3"
:
Style
(bold=
True
),
156
"markdown.h4"
:
Style
(bold=
True
, dim=
True
),
157
"markdown.h5"
:
Style
(underline=
True
),
158
"markdown.h6"
:
Style
(italic=
True
),
159
"markdown.h7"
:
Style
(italic=
True
, dim=
True
),
160
"markdown.link"
:
Style
(color=
"bright_blue"
),
161
"markdown.link_url"
:
Style
(color=
"blue"
, underline=
True
),
162
"markdown.s"
:
Style
(strike=
True
),
163
"iso8601.date"
:
Style
(color=
"blue"
),
164
"iso8601.time"
:
Style
(color=
"magenta"
),
165
"iso8601.timezone"
:
Style
(color=
"yellow"
),
166
}
167
168
169
if
__name__ ==
"__main__"
:
# pragma: no cover
170
import
argparse
171
import
io
172
173
from
pip._vendor.rich.console
import
Console
174
from
pip._vendor.rich.table
import
Table
175
from
pip._vendor.rich.text
import
Text
176
177
parser =
argparse.ArgumentParser
()
178
parser.add_argument
(
"--html"
, action=
"store_true"
, help=
"Export as HTML table"
)
179
args =
parser.parse_args
()
180
html: bool =
args.html
181
console =
Console
(record=
True
, width=70, file=
io.StringIO
())
if
html
else
Console
()
182
183
table =
Table
(
"Name"
,
"Styling"
)
184
185
for
style_name, style
in
DEFAULT_STYLES.items
():
186
table.add_row
(
Text
(style_name, style=style), str(style))
187
188
console.print
(table)
189
if
html:
190
print(
console.export_html
(inline_styles=
True
))
pip._vendor.rich.console.Console
Definition
console.py:593
pip._vendor.rich.style.Style
Definition
style.py:31
pip._vendor.rich.table.Table
Definition
table.py:151
pip._vendor.rich.text.Text
Definition
text.py:101
pip._vendor.rich.console
Definition
console.py:1
pip._vendor.rich.table
Definition
table.py:1
pip._vendor.rich.text
Definition
text.py:1
i
for i
Definition
prime_search.m:10
venv
lib
python3.12
site-packages
pip
_vendor
rich
default_styles.py
Generated by
1.9.8