Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate hooks (pydata#2091)
Browse files Browse the repository at this point in the history
<!--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 pydata#2094

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Daniel McCloy <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and drammock authored Jan 8, 2025
1 parent 9b92ec9 commit d76892d
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 35 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ default_language_version:

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

- repo: "https://github.com/astral-sh/ruff-pre-commit"
rev: "v0.8.1"
rev: "v0.8.6"
hooks:
- id: ruff
args: [--exit-non-zero-on-fix]
- id: ruff-format

- repo: "https://github.com/asottile/pyupgrade"
rev: v3.19.0
rev: v3.19.1
hooks:
- id: pyupgrade
args: [--py37-plus]

- repo: "https://github.com/Riverside-Healthcare/djLint"
rev: v1.36.3
rev: v1.36.4
hooks:
- id: djlint-jinja
types_or: ["html"]
Expand All @@ -56,7 +56,7 @@ repos:
- id: remove-metadata

- repo: "https://github.com/thibaudcolas/pre-commit-stylelint"
rev: v16.11.0
rev: v16.12.0
hooks:
- id: stylelint
# automatically fix .scss files where possible
Expand Down
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@
$rgb-col: map.merge(
$rgb-col,
(
$channel:
math.pow(math.div((math.div($value, 255) + 0.055), 1.055), 2.4),
$channel: math.pow(
math.div((math.div($value, 255) + 0.055), 1.055),
2.4
),
)
);
}
Expand Down
24 changes: 8 additions & 16 deletions src/pydata_sphinx_theme/assets/styles/variables/_color.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
/* Assign base colors for the PyData theme */
$color-palette: (
// Primary color
"teal":
(
"teal": (
"50": #f4fbfc,
"100": #e9f6f8,
"200": #d0ecf1,
Expand All @@ -40,8 +39,7 @@ $color-palette: (
"900": #021b1f,
),
// Secondary color
"violet":
(
"violet": (
"50": #f4eefb,
"100": #e0c7ff,
"200": #d5b4fd,
Expand All @@ -54,8 +52,7 @@ $color-palette: (
"900": #1e0e39,
),
// Neutrals
"gray":
(
"gray": (
"50": #f9f9fa,
"100": #f3f4f5,
"200": #e5e7ea,
Expand All @@ -68,8 +65,7 @@ $color-palette: (
"900": #14181e,
),
// Accent color
"pink":
(
"pink": (
"50": #fcf8fd,
"100": #fcf0fa,
"200": #f8dff5,
Expand Down Expand Up @@ -161,8 +157,7 @@ $pst-semantic-colors: (
"bg-dark": #002f17,
),
// This is based on the warning color
"attention":
(
"attention": (
"light": var(--pst-color-warning),
"bg-light": var(--pst-color-warning-bg),
"dark": var(--pst-color-warning),
Expand Down Expand Up @@ -229,15 +224,13 @@ $pst-semantic-colors: (
// DEPTH COLORS - you can see the elevation colours and shades
// in the Figma file https://www.figma.com/file/rUrrHGhUBBIAAjQ82x6pz9/PyData-Design-system---proposal-for-implementation-(2)?node-id=1492%3A922&t=sQeQZehkOzposYEg-1
// background: color of the canvas / the furthest back layer
"background":
(
"background": (
"light": #{map-deep-get($color-palette, "foundation", "white")},
"dark": #{map-deep-get($color-palette, "foundation", "black")},
),
// on-background: provides slight contrast against background
// (by use of shadows in light theme)
"on-background":
(
"on-background": (
"light": #{map-deep-get($color-palette, "foundation", "white")},
"dark": #{map-deep-get($color-palette, "gray", "800")},
),
Expand All @@ -246,8 +239,7 @@ $pst-semantic-colors: (
"dark": #{map-deep-get($color-palette, "gray", "700")},
),
// on_surface: object on top of surface object (without shadows)
"on-surface":
(
"on-surface": (
"light": #{map-deep-get($color-palette, "gray", "800")},
"dark": $foundation-light-gray,
),
Expand Down
6 changes: 3 additions & 3 deletions src/pydata_sphinx_theme/assets/styles/variables/_fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ html {

// Font family
// These are adapted from https://systemfontstack.com/ */
--pst-font-family-base-system: -apple-system, "BlinkMacSystemFont", "Segoe UI",
"Helvetica Neue", "Arial", sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol";
--pst-font-family-base-system: -apple-system, "BlinkMacSystemFont",
"Segoe UI", "Helvetica Neue", "Arial", sans-serif, "Apple Color Emoji",
"Segoe UI Emoji", "Segoe UI Symbol";
--pst-font-family-monospace-system: "SFMono-Regular", "Menlo", "Consolas",
"Monaco", "Liberation Mono", "Lucida Console", monospace;
--pst-font-family-base: var(--pst-font-family-base-system);
Expand Down
11 changes: 6 additions & 5 deletions tests/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -891,8 +891,8 @@ def test_pygments_fallbacks(sphinx_build_factory, style_names, keyword_colors) -
# see if our warnings worked
if style_names[0].startswith("fake"):
assert len(warnings) == 2
re.match(r"Color theme fake_foo.*tango", warnings[0])
re.match(r"Color theme fake_bar.*monokai", warnings[1])
assert re.search(r"Highlighting style fake_foo.*tango", warnings[0])
assert re.search(r"Highlighting style fake_bar.*monokai", warnings[1])
else:
assert warnings == [""]
# test that the rendered HTML has highlighting spans
Expand All @@ -908,10 +908,11 @@ def test_pygments_fallbacks(sphinx_build_factory, style_names, keyword_colors) -
assert lines[0].startswith('html[data-theme="light"]')
for mode, color in dict(zip(["light", "dark"], keyword_colors)).items():
regexp = re.compile(
r'html\[data-theme="' + mode + r'"\].*\.k .*color: ' + color
r'html\[data-theme="' + mode + r'"\].*\.k .*color:\s?' + color,
re.IGNORECASE,
)
matches = [regexp.match(line) is not None for line in lines]
assert sum(matches) == 1
matches = [regexp.search(line) is not None for line in lines]
assert sum(matches) == 1, f"expected {mode}: {color}\n" + "\n".join(lines)


def test_deprecated_build_html(sphinx_build_factory, file_regression) -> None:
Expand Down

0 comments on commit d76892d

Please sign in to comment.