Skip to content

Apply format and linting auto fixes #172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
python -m pip install build

- name: build the dist files
run: |
run: |
python -m build .

- name: Upload the dist files
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ jobs:
python -m pip install pytest
- name: Run the tests
run: |
pytest .
pytest .
44 changes: 22 additions & 22 deletions docs/_themes/flask_small/static/flasky.css_t
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
* :license: BSD, see LICENSE for details.
*
*/

@import url("basic.css");

/* -- page layout ----------------------------------------------------------- */

body {
font-family: 'Georgia', serif;
font-size: 17px;
Expand All @@ -35,7 +35,7 @@ div.bodywrapper {
hr {
border: 1px solid #B1B4B6;
}

div.body {
background-color: #ffffff;
color: #3E4349;
Expand All @@ -46,7 +46,7 @@ img.floatingflask {
padding: 0 0 10px 10px;
float: right;
}

div.footer {
text-align: right;
color: #888;
Expand All @@ -55,12 +55,12 @@ div.footer {
width: 650px;
margin: 0 auto 40px auto;
}

div.footer a {
color: #888;
text-decoration: underline;
}

div.related {
line-height: 32px;
color: #888;
Expand All @@ -69,18 +69,18 @@ div.related {
div.related ul {
padding: 0 0 0 10px;
}

div.related a {
color: #444;
}

/* -- body styles ----------------------------------------------------------- */

a {
color: #004B6B;
text-decoration: underline;
}

a:hover {
color: #6D4100;
text-decoration: underline;
Expand All @@ -89,7 +89,7 @@ a:hover {
div.body {
padding-bottom: 40px; /* saved for footer */
}

div.body h1,
div.body h2,
div.body h3,
Expand All @@ -109,24 +109,24 @@ div.indexwrapper h1 {
height: {{ theme_index_logo_height }};
}
{% endif %}

div.body h2 { font-size: 180%; }
div.body h3 { font-size: 150%; }
div.body h4 { font-size: 130%; }
div.body h5 { font-size: 100%; }
div.body h6 { font-size: 100%; }

a.headerlink {
color: white;
padding: 0 4px;
text-decoration: none;
}

a.headerlink:hover {
color: #444;
background: #eaeaea;
}

div.body p, div.body dd, div.body li {
line-height: 1.4em;
}
Expand Down Expand Up @@ -164,25 +164,25 @@ div.note {
background-color: #eee;
border: 1px solid #ccc;
}

div.seealso {
background-color: #ffc;
border: 1px solid #ff6;
}

div.topic {
background-color: #eee;
}

div.warning {
background-color: #ffe4e4;
border: 1px solid #f66;
}

p.admonition-title {
display: inline;
}

p.admonition-title:after {
content: ":";
}
Expand Down Expand Up @@ -254,7 +254,7 @@ dl {
dl dd {
margin-left: 30px;
}

pre {
padding: 0;
margin: 15px -30px;
Expand Down
149 changes: 77 additions & 72 deletions docs/_themes/flask_theme_support.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
# flasky extensions. flasky pygments style based on tango style
from __future__ import annotations

from pygments.style import Style
from pygments.token import Keyword, Name, Comment, String, Error, \
Number, Operator, Generic, Whitespace, Punctuation, Other, Literal
from pygments.token import (
Comment,
Error,
Generic,
Keyword,
Literal,
Name,
Number,
Operator,
Other,
Punctuation,
String,
Whitespace,
)


class FlaskyStyle(Style):
Expand All @@ -10,77 +24,68 @@ class FlaskyStyle(Style):

styles = {
# No corresponding class for the following:
#Text: "", # class: ""
Whitespace: "underline #f8f8f8", # class: "w"
Error: "#a40000 border:#ef2929", # class: "err"
Other: "#000000", # class "x"

Comment: "italic #8f5902", # class: "c"
Comment.Preproc: "noitalic", # class: "cp"

Keyword: "bold #004461", # class: "k"
Keyword.Constant: "bold #004461", # class: "kc"
Keyword.Declaration: "bold #004461", # class: "kd"
Keyword.Namespace: "bold #004461", # class: "kn"
Keyword.Pseudo: "bold #004461", # class: "kp"
Keyword.Reserved: "bold #004461", # class: "kr"
Keyword.Type: "bold #004461", # class: "kt"

Operator: "#582800", # class: "o"
Operator.Word: "bold #004461", # class: "ow" - like keywords

Punctuation: "bold #000000", # class: "p"

# Text: "", # class: ""
Whitespace: "underline #f8f8f8", # class: "w"
Error: "#a40000 border:#ef2929", # class: "err"
Other: "#000000", # class "x"
Comment: "italic #8f5902", # class: "c"
Comment.Preproc: "noitalic", # class: "cp"
Keyword: "bold #004461", # class: "k"
Keyword.Constant: "bold #004461", # class: "kc"
Keyword.Declaration: "bold #004461", # class: "kd"
Keyword.Namespace: "bold #004461", # class: "kn"
Keyword.Pseudo: "bold #004461", # class: "kp"
Keyword.Reserved: "bold #004461", # class: "kr"
Keyword.Type: "bold #004461", # class: "kt"
Operator: "#582800", # class: "o"
Operator.Word: "bold #004461", # class: "ow" - like keywords
Punctuation: "bold #000000", # class: "p"
# because special names such as Name.Class, Name.Function, etc.
# are not recognized as such later in the parsing, we choose them
# to look the same as ordinary variables.
Name: "#000000", # class: "n"
Name.Attribute: "#c4a000", # class: "na" - to be revised
Name.Builtin: "#004461", # class: "nb"
Name.Builtin.Pseudo: "#3465a4", # class: "bp"
Name.Class: "#000000", # class: "nc" - to be revised
Name.Constant: "#000000", # class: "no" - to be revised
Name.Decorator: "#888", # class: "nd" - to be revised
Name.Entity: "#ce5c00", # class: "ni"
Name.Exception: "bold #cc0000", # class: "ne"
Name.Function: "#000000", # class: "nf"
Name.Property: "#000000", # class: "py"
Name.Label: "#f57900", # class: "nl"
Name.Namespace: "#000000", # class: "nn" - to be revised
Name.Other: "#000000", # class: "nx"
Name.Tag: "bold #004461", # class: "nt" - like a keyword
Name.Variable: "#000000", # class: "nv" - to be revised
Name.Variable.Class: "#000000", # class: "vc" - to be revised
Name.Variable.Global: "#000000", # class: "vg" - to be revised
Name.Variable.Instance: "#000000", # class: "vi" - to be revised

Number: "#990000", # class: "m"

Literal: "#000000", # class: "l"
Literal.Date: "#000000", # class: "ld"

String: "#4e9a06", # class: "s"
String.Backtick: "#4e9a06", # class: "sb"
String.Char: "#4e9a06", # class: "sc"
String.Doc: "italic #8f5902", # class: "sd" - like a comment
String.Double: "#4e9a06", # class: "s2"
String.Escape: "#4e9a06", # class: "se"
String.Heredoc: "#4e9a06", # class: "sh"
String.Interpol: "#4e9a06", # class: "si"
String.Other: "#4e9a06", # class: "sx"
String.Regex: "#4e9a06", # class: "sr"
String.Single: "#4e9a06", # class: "s1"
String.Symbol: "#4e9a06", # class: "ss"

Generic: "#000000", # class: "g"
Generic.Deleted: "#a40000", # class: "gd"
Generic.Emph: "italic #000000", # class: "ge"
Generic.Error: "#ef2929", # class: "gr"
Generic.Heading: "bold #000080", # class: "gh"
Generic.Inserted: "#00A000", # class: "gi"
Generic.Output: "#888", # class: "go"
Generic.Prompt: "#745334", # class: "gp"
Generic.Strong: "bold #000000", # class: "gs"
Generic.Subheading: "bold #800080", # class: "gu"
Generic.Traceback: "bold #a40000", # class: "gt"
Name: "#000000", # class: "n"
Name.Attribute: "#c4a000", # class: "na" - to be revised
Name.Builtin: "#004461", # class: "nb"
Name.Builtin.Pseudo: "#3465a4", # class: "bp"
Name.Class: "#000000", # class: "nc" - to be revised
Name.Constant: "#000000", # class: "no" - to be revised
Name.Decorator: "#888", # class: "nd" - to be revised
Name.Entity: "#ce5c00", # class: "ni"
Name.Exception: "bold #cc0000", # class: "ne"
Name.Function: "#000000", # class: "nf"
Name.Property: "#000000", # class: "py"
Name.Label: "#f57900", # class: "nl"
Name.Namespace: "#000000", # class: "nn" - to be revised
Name.Other: "#000000", # class: "nx"
Name.Tag: "bold #004461", # class: "nt" - like a keyword
Name.Variable: "#000000", # class: "nv" - to be revised
Name.Variable.Class: "#000000", # class: "vc" - to be revised
Name.Variable.Global: "#000000", # class: "vg" - to be revised
Name.Variable.Instance: "#000000", # class: "vi" - to be revised
Number: "#990000", # class: "m"
Literal: "#000000", # class: "l"
Literal.Date: "#000000", # class: "ld"
String: "#4e9a06", # class: "s"
String.Backtick: "#4e9a06", # class: "sb"
String.Char: "#4e9a06", # class: "sc"
String.Doc: "italic #8f5902", # class: "sd" - like a comment
String.Double: "#4e9a06", # class: "s2"
String.Escape: "#4e9a06", # class: "se"
String.Heredoc: "#4e9a06", # class: "sh"
String.Interpol: "#4e9a06", # class: "si"
String.Other: "#4e9a06", # class: "sx"
String.Regex: "#4e9a06", # class: "sr"
String.Single: "#4e9a06", # class: "s1"
String.Symbol: "#4e9a06", # class: "ss"
Generic: "#000000", # class: "g"
Generic.Deleted: "#a40000", # class: "gd"
Generic.Emph: "italic #000000", # class: "ge"
Generic.Error: "#ef2929", # class: "gr"
Generic.Heading: "bold #000080", # class: "gh"
Generic.Inserted: "#00A000", # class: "gi"
Generic.Output: "#888", # class: "go"
Generic.Prompt: "#745334", # class: "gp"
Generic.Strong: "bold #000000", # class: "gs"
Generic.Subheading: "bold #800080", # class: "gu"
Generic.Traceback: "bold #a40000", # class: "gt"
}
Loading
Loading