Skip to content

Commit

Permalink
chore: update pre-commit hooks (#25)
Browse files Browse the repository at this point in the history
* chore: update pre-commit hooks

updates:
- [github.com/adamchainz/blacken-docs: 1.18.0 → 1.19.1](adamchainz/blacken-docs@1.18.0...1.19.1)
- [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](pre-commit/pre-commit-hooks@v4.6.0...v5.0.0)
- [github.com/astral-sh/ruff-pre-commit: v0.5.5 → v0.7.2](astral-sh/ruff-pre-commit@v0.5.5...v0.7.2)
- [github.com/pre-commit/mirrors-mypy: v1.11.0 → v1.13.0](pre-commit/mirrors-mypy@v1.11.0...v1.13.0)
- [github.com/abravalheri/validate-pyproject: v0.18 → v0.22](abravalheri/validate-pyproject@v0.18...v0.22)
- [github.com/python-jsonschema/check-jsonschema: 0.29.1 → 0.29.4](python-jsonschema/check-jsonschema@0.29.1...0.29.4)
- [github.com/scientific-python/cookie: 2024.04.23 → 2024.08.19](scientific-python/cookie@2024.04.23...2024.08.19)

* style: pre-commit fixes

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Nov 6, 2024
1 parent 2f3a1c3 commit b032d6b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ ci:

repos:
- repo: https://github.com/adamchainz/blacken-docs
rev: "1.18.0"
rev: "1.19.1"
hooks:
- id: blacken-docs
additional_dependencies: [black==24.*]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.6.0"
rev: "v5.0.0"
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand Down Expand Up @@ -45,14 +45,14 @@ repos:
args: [--prose-wrap=always]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.5.5"
rev: "v0.7.2"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.11.0"
rev: "v1.13.0"
hooks:
- id: mypy
files: src|tests
Expand All @@ -79,19 +79,19 @@ repos:
exclude: .pre-commit-config.yaml

- repo: https://github.com/abravalheri/validate-pyproject
rev: "v0.18"
rev: "v0.22"
hooks:
- id: validate-pyproject
additional_dependencies: ["validate-pyproject-schema-store[all]"]

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: "0.29.1"
rev: "0.29.4"
hooks:
- id: check-dependabot
- id: check-github-workflows
- id: check-readthedocs

- repo: https://github.com/scientific-python/cookie
rev: "2024.04.23"
rev: "2024.08.19"
hooks:
- id: sp-repo-review
18 changes: 12 additions & 6 deletions docs/notebooks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,12 @@
"metadata": {},
"outputs": [],
"source": [
"from matplotlib import rcParams, cycler\n",
"from __future__ import annotations\n",
"\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"from matplotlib import cycler, rcParams\n",
"\n",
"plt.ion()"
]
},
Expand All @@ -69,17 +72,20 @@
"data = [np.logspace(0, 1, 100) + np.random.randn(100) + ii for ii in range(N)]\n",
"data = np.array(data).T\n",
"cmap = plt.cm.coolwarm\n",
"rcParams['axes.prop_cycle'] = cycler(color=cmap(np.linspace(0, 1, N)))\n",
"rcParams[\"axes.prop_cycle\"] = cycler(color=cmap(np.linspace(0, 1, N)))\n",
"\n",
"\n",
"from matplotlib.lines import Line2D\n",
"custom_lines = [Line2D([0], [0], color=cmap(0.), lw=4),\n",
" Line2D([0], [0], color=cmap(.5), lw=4),\n",
" Line2D([0], [0], color=cmap(1.), lw=4)]\n",
"\n",
"custom_lines = [\n",
" Line2D([0], [0], color=cmap(0.0), lw=4),\n",
" Line2D([0], [0], color=cmap(0.5), lw=4),\n",
" Line2D([0], [0], color=cmap(1.0), lw=4),\n",
"]\n",
"\n",
"fig, ax = plt.subplots(figsize=(10, 5))\n",
"lines = ax.plot(data)\n",
"ax.legend(custom_lines, ['Cold', 'Medium', 'Hot']);"
"ax.legend(custom_lines, [\"Cold\", \"Medium\", \"Hot\"]);"
]
},
{
Expand Down

0 comments on commit b032d6b

Please sign in to comment.