Skip to content

Commit d76892d

Browse files
[pre-commit.ci] pre-commit autoupdate hooks (#2091)
<!--pre-commit.ci start--> updates: - [github.com/pycontribs/mirrors-prettier: v3.3.3 → v3.4.2](pycontribs/mirrors-prettier@v3.3.3...v3.4.2) - [github.com/astral-sh/ruff-pre-commit: v0.8.1 → v0.8.6](astral-sh/ruff-pre-commit@v0.8.1...v0.8.6) - [github.com/asottile/pyupgrade: v3.19.0 → v3.19.1](asottile/pyupgrade@v3.19.0...v3.19.1) - [github.com/Riverside-Healthcare/djLint: v1.36.3 → v1.36.4](djlint/djLint@v1.36.3...v1.36.4) - [github.com/thibaudcolas/pre-commit-stylelint: v16.11.0 → v16.12.0](thibaudcolas/pre-commit-stylelint@v16.11.0...v16.12.0) <!--pre-commit.ci end--> closes #2094 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Daniel McCloy <[email protected]>
1 parent 9b92ec9 commit d76892d

File tree

6 files changed

+31
-35
lines changed

6 files changed

+31
-35
lines changed

.pre-commit-config.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ default_language_version:
1313

1414
repos:
1515
- repo: "https://github.com/pycontribs/mirrors-prettier"
16-
rev: v3.3.3
16+
rev: v3.4.2
1717
hooks:
1818
- id: prettier
1919
# Exclude the HTML, since it doesn't understand Jinja2
@@ -22,20 +22,20 @@ repos:
2222
exclude: .+\.html|webpack\.config\.js|tests/test_a11y/
2323

2424
- repo: "https://github.com/astral-sh/ruff-pre-commit"
25-
rev: "v0.8.1"
25+
rev: "v0.8.6"
2626
hooks:
2727
- id: ruff
2828
args: [--exit-non-zero-on-fix]
2929
- id: ruff-format
3030

3131
- repo: "https://github.com/asottile/pyupgrade"
32-
rev: v3.19.0
32+
rev: v3.19.1
3333
hooks:
3434
- id: pyupgrade
3535
args: [--py37-plus]
3636

3737
- repo: "https://github.com/Riverside-Healthcare/djLint"
38-
rev: v1.36.3
38+
rev: v1.36.4
3939
hooks:
4040
- id: djlint-jinja
4141
types_or: ["html"]
@@ -56,7 +56,7 @@ repos:
5656
- id: remove-metadata
5757

5858
- repo: "https://github.com/thibaudcolas/pre-commit-stylelint"
59-
rev: v16.11.0
59+
rev: v16.12.0
6060
hooks:
6161
- id: stylelint
6262
# automatically fix .scss files where possible

package-lock.json

+5-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/pydata_sphinx_theme/assets/styles/abstracts/_accessibility.scss

+4-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@
7070
$rgb-col: map.merge(
7171
$rgb-col,
7272
(
73-
$channel:
74-
math.pow(math.div((math.div($value, 255) + 0.055), 1.055), 2.4),
73+
$channel: math.pow(
74+
math.div((math.div($value, 255) + 0.055), 1.055),
75+
2.4
76+
),
7577
)
7678
);
7779
}

src/pydata_sphinx_theme/assets/styles/variables/_color.scss

+8-16
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
/* Assign base colors for the PyData theme */
2727
$color-palette: (
2828
// Primary color
29-
"teal":
30-
(
29+
"teal": (
3130
"50": #f4fbfc,
3231
"100": #e9f6f8,
3332
"200": #d0ecf1,
@@ -40,8 +39,7 @@ $color-palette: (
4039
"900": #021b1f,
4140
),
4241
// Secondary color
43-
"violet":
44-
(
42+
"violet": (
4543
"50": #f4eefb,
4644
"100": #e0c7ff,
4745
"200": #d5b4fd,
@@ -54,8 +52,7 @@ $color-palette: (
5452
"900": #1e0e39,
5553
),
5654
// Neutrals
57-
"gray":
58-
(
55+
"gray": (
5956
"50": #f9f9fa,
6057
"100": #f3f4f5,
6158
"200": #e5e7ea,
@@ -68,8 +65,7 @@ $color-palette: (
6865
"900": #14181e,
6966
),
7067
// Accent color
71-
"pink":
72-
(
68+
"pink": (
7369
"50": #fcf8fd,
7470
"100": #fcf0fa,
7571
"200": #f8dff5,
@@ -161,8 +157,7 @@ $pst-semantic-colors: (
161157
"bg-dark": #002f17,
162158
),
163159
// This is based on the warning color
164-
"attention":
165-
(
160+
"attention": (
166161
"light": var(--pst-color-warning),
167162
"bg-light": var(--pst-color-warning-bg),
168163
"dark": var(--pst-color-warning),
@@ -229,15 +224,13 @@ $pst-semantic-colors: (
229224
// DEPTH COLORS - you can see the elevation colours and shades
230225
// in the Figma file https://www.figma.com/file/rUrrHGhUBBIAAjQ82x6pz9/PyData-Design-system---proposal-for-implementation-(2)?node-id=1492%3A922&t=sQeQZehkOzposYEg-1
231226
// background: color of the canvas / the furthest back layer
232-
"background":
233-
(
227+
"background": (
234228
"light": #{map-deep-get($color-palette, "foundation", "white")},
235229
"dark": #{map-deep-get($color-palette, "foundation", "black")},
236230
),
237231
// on-background: provides slight contrast against background
238232
// (by use of shadows in light theme)
239-
"on-background":
240-
(
233+
"on-background": (
241234
"light": #{map-deep-get($color-palette, "foundation", "white")},
242235
"dark": #{map-deep-get($color-palette, "gray", "800")},
243236
),
@@ -246,8 +239,7 @@ $pst-semantic-colors: (
246239
"dark": #{map-deep-get($color-palette, "gray", "700")},
247240
),
248241
// on_surface: object on top of surface object (without shadows)
249-
"on-surface":
250-
(
242+
"on-surface": (
251243
"light": #{map-deep-get($color-palette, "gray", "800")},
252244
"dark": $foundation-light-gray,
253245
),

src/pydata_sphinx_theme/assets/styles/variables/_fonts.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ html {
3333

3434
// Font family
3535
// These are adapted from https://systemfontstack.com/ */
36-
--pst-font-family-base-system: -apple-system, "BlinkMacSystemFont", "Segoe UI",
37-
"Helvetica Neue", "Arial", sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
38-
"Segoe UI Symbol";
36+
--pst-font-family-base-system: -apple-system, "BlinkMacSystemFont",
37+
"Segoe UI", "Helvetica Neue", "Arial", sans-serif, "Apple Color Emoji",
38+
"Segoe UI Emoji", "Segoe UI Symbol";
3939
--pst-font-family-monospace-system: "SFMono-Regular", "Menlo", "Consolas",
4040
"Monaco", "Liberation Mono", "Lucida Console", monospace;
4141
--pst-font-family-base: var(--pst-font-family-base-system);

tests/test_build.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -891,8 +891,8 @@ def test_pygments_fallbacks(sphinx_build_factory, style_names, keyword_colors) -
891891
# see if our warnings worked
892892
if style_names[0].startswith("fake"):
893893
assert len(warnings) == 2
894-
re.match(r"Color theme fake_foo.*tango", warnings[0])
895-
re.match(r"Color theme fake_bar.*monokai", warnings[1])
894+
assert re.search(r"Highlighting style fake_foo.*tango", warnings[0])
895+
assert re.search(r"Highlighting style fake_bar.*monokai", warnings[1])
896896
else:
897897
assert warnings == [""]
898898
# test that the rendered HTML has highlighting spans
@@ -908,10 +908,11 @@ def test_pygments_fallbacks(sphinx_build_factory, style_names, keyword_colors) -
908908
assert lines[0].startswith('html[data-theme="light"]')
909909
for mode, color in dict(zip(["light", "dark"], keyword_colors)).items():
910910
regexp = re.compile(
911-
r'html\[data-theme="' + mode + r'"\].*\.k .*color: ' + color
911+
r'html\[data-theme="' + mode + r'"\].*\.k .*color:\s?' + color,
912+
re.IGNORECASE,
912913
)
913-
matches = [regexp.match(line) is not None for line in lines]
914-
assert sum(matches) == 1
914+
matches = [regexp.search(line) is not None for line in lines]
915+
assert sum(matches) == 1, f"expected {mode}: {color}\n" + "\n".join(lines)
915916

916917

917918
def test_deprecated_build_html(sphinx_build_factory, file_regression) -> None:

0 commit comments

Comments
 (0)