Skip to content
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

ci(pre-commit.ci): autoupdate #70

Merged
merged 4 commits into from
Nov 1, 2024
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
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exclude: ^LICENSE

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-docstring-first
- id: end-of-file-fixer
Expand All @@ -16,7 +16,7 @@ repos:
args: [--autofix]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
rev: v0.7.1
hooks:
- id: ruff
args: [--fix, --unsafe-fixes]
Expand All @@ -30,7 +30,7 @@ repos:
# - id: validate-pyproject

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.1
rev: v1.13.0
hooks:
- id: mypy
files: "^src/"
Expand Down
4 changes: 2 additions & 2 deletions src/cmap/_colormap.py
Original file line number Diff line number Diff line change
Expand Up @@ -1345,9 +1345,9 @@ def _mpl_segmentdata_to_stops(
A list of (position, [r, g, b]) tuples.
"""
if all(callable(v) for v in data.values()):
funcs = (data["red"], data["green"], data["blue"])
funcs: tuple = (data["red"], data["green"], data["blue"])
if "alpha" in data:
return partial(_map_rgb, (*funcs, data["alpha"]))
funcs = (*funcs, data["alpha"])
return partial(_map_rgb, funcs)
if any(callable(v) for v in data.values()):
raise ValueError(
Expand Down