Skip to content

Commit e7ea851

Browse files
authored
Apply format and linting auto fixes (#172)
1 parent 13c453f commit e7ea851

File tree

15 files changed

+259
-233
lines changed

15 files changed

+259
-233
lines changed

.github/workflows/release-python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
python -m pip install build
3838
3939
- name: build the dist files
40-
run: |
40+
run: |
4141
python -m build .
4242
4343
- name: Upload the dist files

.github/workflows/test-python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ jobs:
6262
python -m pip install pytest
6363
- name: Run the tests
6464
run: |
65-
pytest .
65+
pytest .

docs/_themes/flask_small/static/flasky.css_t

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
* :license: BSD, see LICENSE for details.
99
*
1010
*/
11-
11+
1212
@import url("basic.css");
13-
13+
1414
/* -- page layout ----------------------------------------------------------- */
15-
15+
1616
body {
1717
font-family: 'Georgia', serif;
1818
font-size: 17px;
@@ -35,7 +35,7 @@ div.bodywrapper {
3535
hr {
3636
border: 1px solid #B1B4B6;
3737
}
38-
38+
3939
div.body {
4040
background-color: #ffffff;
4141
color: #3E4349;
@@ -46,7 +46,7 @@ img.floatingflask {
4646
padding: 0 0 10px 10px;
4747
float: right;
4848
}
49-
49+
5050
div.footer {
5151
text-align: right;
5252
color: #888;
@@ -55,12 +55,12 @@ div.footer {
5555
width: 650px;
5656
margin: 0 auto 40px auto;
5757
}
58-
58+
5959
div.footer a {
6060
color: #888;
6161
text-decoration: underline;
6262
}
63-
63+
6464
div.related {
6565
line-height: 32px;
6666
color: #888;
@@ -69,18 +69,18 @@ div.related {
6969
div.related ul {
7070
padding: 0 0 0 10px;
7171
}
72-
72+
7373
div.related a {
7474
color: #444;
7575
}
76-
76+
7777
/* -- body styles ----------------------------------------------------------- */
78-
78+
7979
a {
8080
color: #004B6B;
8181
text-decoration: underline;
8282
}
83-
83+
8484
a:hover {
8585
color: #6D4100;
8686
text-decoration: underline;
@@ -89,7 +89,7 @@ a:hover {
8989
div.body {
9090
padding-bottom: 40px; /* saved for footer */
9191
}
92-
92+
9393
div.body h1,
9494
div.body h2,
9595
div.body h3,
@@ -109,24 +109,24 @@ div.indexwrapper h1 {
109109
height: {{ theme_index_logo_height }};
110110
}
111111
{% endif %}
112-
112+
113113
div.body h2 { font-size: 180%; }
114114
div.body h3 { font-size: 150%; }
115115
div.body h4 { font-size: 130%; }
116116
div.body h5 { font-size: 100%; }
117117
div.body h6 { font-size: 100%; }
118-
118+
119119
a.headerlink {
120120
color: white;
121121
padding: 0 4px;
122122
text-decoration: none;
123123
}
124-
124+
125125
a.headerlink:hover {
126126
color: #444;
127127
background: #eaeaea;
128128
}
129-
129+
130130
div.body p, div.body dd, div.body li {
131131
line-height: 1.4em;
132132
}
@@ -164,25 +164,25 @@ div.note {
164164
background-color: #eee;
165165
border: 1px solid #ccc;
166166
}
167-
167+
168168
div.seealso {
169169
background-color: #ffc;
170170
border: 1px solid #ff6;
171171
}
172-
172+
173173
div.topic {
174174
background-color: #eee;
175175
}
176-
176+
177177
div.warning {
178178
background-color: #ffe4e4;
179179
border: 1px solid #f66;
180180
}
181-
181+
182182
p.admonition-title {
183183
display: inline;
184184
}
185-
185+
186186
p.admonition-title:after {
187187
content: ":";
188188
}
@@ -254,7 +254,7 @@ dl {
254254
dl dd {
255255
margin-left: 30px;
256256
}
257-
257+
258258
pre {
259259
padding: 0;
260260
margin: 15px -30px;

docs/_themes/flask_theme_support.py

Lines changed: 77 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
11
# flasky extensions. flasky pygments style based on tango style
2+
from __future__ import annotations
3+
24
from pygments.style import Style
3-
from pygments.token import Keyword, Name, Comment, String, Error, \
4-
Number, Operator, Generic, Whitespace, Punctuation, Other, Literal
5+
from pygments.token import (
6+
Comment,
7+
Error,
8+
Generic,
9+
Keyword,
10+
Literal,
11+
Name,
12+
Number,
13+
Operator,
14+
Other,
15+
Punctuation,
16+
String,
17+
Whitespace,
18+
)
519

620

721
class FlaskyStyle(Style):
@@ -10,77 +24,68 @@ class FlaskyStyle(Style):
1024

1125
styles = {
1226
# No corresponding class for the following:
13-
#Text: "", # class: ""
14-
Whitespace: "underline #f8f8f8", # class: "w"
15-
Error: "#a40000 border:#ef2929", # class: "err"
16-
Other: "#000000", # class "x"
17-
18-
Comment: "italic #8f5902", # class: "c"
19-
Comment.Preproc: "noitalic", # class: "cp"
20-
21-
Keyword: "bold #004461", # class: "k"
22-
Keyword.Constant: "bold #004461", # class: "kc"
23-
Keyword.Declaration: "bold #004461", # class: "kd"
24-
Keyword.Namespace: "bold #004461", # class: "kn"
25-
Keyword.Pseudo: "bold #004461", # class: "kp"
26-
Keyword.Reserved: "bold #004461", # class: "kr"
27-
Keyword.Type: "bold #004461", # class: "kt"
28-
29-
Operator: "#582800", # class: "o"
30-
Operator.Word: "bold #004461", # class: "ow" - like keywords
31-
32-
Punctuation: "bold #000000", # class: "p"
33-
27+
# Text: "", # class: ""
28+
Whitespace: "underline #f8f8f8", # class: "w"
29+
Error: "#a40000 border:#ef2929", # class: "err"
30+
Other: "#000000", # class "x"
31+
Comment: "italic #8f5902", # class: "c"
32+
Comment.Preproc: "noitalic", # class: "cp"
33+
Keyword: "bold #004461", # class: "k"
34+
Keyword.Constant: "bold #004461", # class: "kc"
35+
Keyword.Declaration: "bold #004461", # class: "kd"
36+
Keyword.Namespace: "bold #004461", # class: "kn"
37+
Keyword.Pseudo: "bold #004461", # class: "kp"
38+
Keyword.Reserved: "bold #004461", # class: "kr"
39+
Keyword.Type: "bold #004461", # class: "kt"
40+
Operator: "#582800", # class: "o"
41+
Operator.Word: "bold #004461", # class: "ow" - like keywords
42+
Punctuation: "bold #000000", # class: "p"
3443
# because special names such as Name.Class, Name.Function, etc.
3544
# are not recognized as such later in the parsing, we choose them
3645
# to look the same as ordinary variables.
37-
Name: "#000000", # class: "n"
38-
Name.Attribute: "#c4a000", # class: "na" - to be revised
39-
Name.Builtin: "#004461", # class: "nb"
40-
Name.Builtin.Pseudo: "#3465a4", # class: "bp"
41-
Name.Class: "#000000", # class: "nc" - to be revised
42-
Name.Constant: "#000000", # class: "no" - to be revised
43-
Name.Decorator: "#888", # class: "nd" - to be revised
44-
Name.Entity: "#ce5c00", # class: "ni"
45-
Name.Exception: "bold #cc0000", # class: "ne"
46-
Name.Function: "#000000", # class: "nf"
47-
Name.Property: "#000000", # class: "py"
48-
Name.Label: "#f57900", # class: "nl"
49-
Name.Namespace: "#000000", # class: "nn" - to be revised
50-
Name.Other: "#000000", # class: "nx"
51-
Name.Tag: "bold #004461", # class: "nt" - like a keyword
52-
Name.Variable: "#000000", # class: "nv" - to be revised
53-
Name.Variable.Class: "#000000", # class: "vc" - to be revised
54-
Name.Variable.Global: "#000000", # class: "vg" - to be revised
55-
Name.Variable.Instance: "#000000", # class: "vi" - to be revised
56-
57-
Number: "#990000", # class: "m"
58-
59-
Literal: "#000000", # class: "l"
60-
Literal.Date: "#000000", # class: "ld"
61-
62-
String: "#4e9a06", # class: "s"
63-
String.Backtick: "#4e9a06", # class: "sb"
64-
String.Char: "#4e9a06", # class: "sc"
65-
String.Doc: "italic #8f5902", # class: "sd" - like a comment
66-
String.Double: "#4e9a06", # class: "s2"
67-
String.Escape: "#4e9a06", # class: "se"
68-
String.Heredoc: "#4e9a06", # class: "sh"
69-
String.Interpol: "#4e9a06", # class: "si"
70-
String.Other: "#4e9a06", # class: "sx"
71-
String.Regex: "#4e9a06", # class: "sr"
72-
String.Single: "#4e9a06", # class: "s1"
73-
String.Symbol: "#4e9a06", # class: "ss"
74-
75-
Generic: "#000000", # class: "g"
76-
Generic.Deleted: "#a40000", # class: "gd"
77-
Generic.Emph: "italic #000000", # class: "ge"
78-
Generic.Error: "#ef2929", # class: "gr"
79-
Generic.Heading: "bold #000080", # class: "gh"
80-
Generic.Inserted: "#00A000", # class: "gi"
81-
Generic.Output: "#888", # class: "go"
82-
Generic.Prompt: "#745334", # class: "gp"
83-
Generic.Strong: "bold #000000", # class: "gs"
84-
Generic.Subheading: "bold #800080", # class: "gu"
85-
Generic.Traceback: "bold #a40000", # class: "gt"
46+
Name: "#000000", # class: "n"
47+
Name.Attribute: "#c4a000", # class: "na" - to be revised
48+
Name.Builtin: "#004461", # class: "nb"
49+
Name.Builtin.Pseudo: "#3465a4", # class: "bp"
50+
Name.Class: "#000000", # class: "nc" - to be revised
51+
Name.Constant: "#000000", # class: "no" - to be revised
52+
Name.Decorator: "#888", # class: "nd" - to be revised
53+
Name.Entity: "#ce5c00", # class: "ni"
54+
Name.Exception: "bold #cc0000", # class: "ne"
55+
Name.Function: "#000000", # class: "nf"
56+
Name.Property: "#000000", # class: "py"
57+
Name.Label: "#f57900", # class: "nl"
58+
Name.Namespace: "#000000", # class: "nn" - to be revised
59+
Name.Other: "#000000", # class: "nx"
60+
Name.Tag: "bold #004461", # class: "nt" - like a keyword
61+
Name.Variable: "#000000", # class: "nv" - to be revised
62+
Name.Variable.Class: "#000000", # class: "vc" - to be revised
63+
Name.Variable.Global: "#000000", # class: "vg" - to be revised
64+
Name.Variable.Instance: "#000000", # class: "vi" - to be revised
65+
Number: "#990000", # class: "m"
66+
Literal: "#000000", # class: "l"
67+
Literal.Date: "#000000", # class: "ld"
68+
String: "#4e9a06", # class: "s"
69+
String.Backtick: "#4e9a06", # class: "sb"
70+
String.Char: "#4e9a06", # class: "sc"
71+
String.Doc: "italic #8f5902", # class: "sd" - like a comment
72+
String.Double: "#4e9a06", # class: "s2"
73+
String.Escape: "#4e9a06", # class: "se"
74+
String.Heredoc: "#4e9a06", # class: "sh"
75+
String.Interpol: "#4e9a06", # class: "si"
76+
String.Other: "#4e9a06", # class: "sx"
77+
String.Regex: "#4e9a06", # class: "sr"
78+
String.Single: "#4e9a06", # class: "s1"
79+
String.Symbol: "#4e9a06", # class: "ss"
80+
Generic: "#000000", # class: "g"
81+
Generic.Deleted: "#a40000", # class: "gd"
82+
Generic.Emph: "italic #000000", # class: "ge"
83+
Generic.Error: "#ef2929", # class: "gr"
84+
Generic.Heading: "bold #000080", # class: "gh"
85+
Generic.Inserted: "#00A000", # class: "gi"
86+
Generic.Output: "#888", # class: "go"
87+
Generic.Prompt: "#745334", # class: "gp"
88+
Generic.Strong: "bold #000000", # class: "gs"
89+
Generic.Subheading: "bold #800080", # class: "gu"
90+
Generic.Traceback: "bold #a40000", # class: "gt"
8691
}

0 commit comments

Comments
 (0)