Skip to content

Commit 3ee48b8

Browse files
chore(deps): update pre-commit hooks (#1017)
* chore(deps): update pre-commit hooks updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.8 → v0.11.12](astral-sh/ruff-pre-commit@v0.11.8...v0.11.12) - [github.com/pre-commit/mirrors-mypy: v1.15.0 → v1.16.0](pre-commit/mirrors-mypy@v1.15.0...v1.16.0) - [github.com/pre-commit/mirrors-clang-format: v20.1.3 → v20.1.5](pre-commit/mirrors-clang-format@v20.1.3...v20.1.5) - [github.com/henryiii/validate-pyproject-schema-store: 2025.04.28 → 2025.05.12](henryiii/validate-pyproject-schema-store@2025.04.28...2025.05.12) * chore: remove weird mypy workaround Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent 1dd2e0e commit 3ee48b8

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ repos:
3636
types_or: [yaml, markdown, html, css, scss, javascript, json]
3737

3838
- repo: https://github.com/astral-sh/ruff-pre-commit
39-
rev: "v0.11.8"
39+
rev: "v0.11.12"
4040
hooks:
4141
- id: ruff
4242
args: ["--fix", "--show-fixes"]
4343
- id: ruff-format
4444

4545
- repo: https://github.com/pre-commit/mirrors-mypy
46-
rev: v1.15.0
46+
rev: v1.16.0
4747
hooks:
4848
- id: mypy
4949
files: ^src
@@ -65,7 +65,7 @@ repos:
6565
exclude: .pre-commit-config.yaml
6666

6767
- repo: https://github.com/pre-commit/mirrors-clang-format
68-
rev: v20.1.3
68+
rev: v20.1.5
6969
hooks:
7070
- id: clang-format
7171
types_or: [c++]
@@ -84,6 +84,6 @@ repos:
8484
- id: check-github-workflows
8585

8686
- repo: https://github.com/henryiii/validate-pyproject-schema-store
87-
rev: 2025.04.28
87+
rev: 2025.05.12
8888
hooks:
8989
- id: validate-pyproject

src/boost_histogram/histogram.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,7 @@ class Kind(str, Enum):
5959
COUNT = "COUNT"
6060
MEAN = "MEAN"
6161

62-
# This cast + type ignore is really odd, so it deserves a quick
63-
# explanation. If we just set this like StrEnum does, then mypy complains
64-
# that the type is changing (str -> Kind). If we type: ignore, then
65-
# MyPy claims that the type: ignore is not needed. If we cast, we get the
66-
# same error as before. But if we cast and type: ignore, it now works.
67-
# Will report to MyPy. Tested on 0.800.
68-
__str__ = typing.cast(Callable[["Kind"], str], str.__str__) # type: ignore[assignment]
62+
__str__ = str.__str__
6963

7064

7165
__all__ = [

0 commit comments

Comments
 (0)