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

chore(deps): update pre-commit hooks #863

Merged
merged 7 commits into from
Jul 5, 2023
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
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ repos:
additional_dependencies: [pyyaml]

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.3.0
rev: v2.4.0
hooks:
- id: setup-cfg-fmt
args: [--include-version-classifiers, --max-py-version=3.11]
args: [--include-version-classifiers, --min-py3-version=3.7, --max-py-version=3.11]

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

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0
rev: v1.4.1
hooks:
- id: mypy
files: ^src
Expand Down
6 changes: 3 additions & 3 deletions src/boost_histogram/_internal/axestuple.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

from functools import partial
from typing import Any, Iterable, TypeVar
from typing import Any, ClassVar, Iterable, TypeVar

import numpy as np

Expand All @@ -21,7 +21,7 @@ class MGridOpts(TypedDict):
class ArrayTuple(tuple): # type: ignore[type-arg]
__slots__ = ()
# This is an exhaustive list as of NumPy 1.19
_REDUCTIONS = {"sum", "any", "all", "min", "max", "prod"}
_REDUCTIONS = frozenset(("sum", "any", "all", "min", "max", "prod"))

def __getattr__(self, name: str) -> Any:
if name in self._REDUCTIONS:
Expand Down Expand Up @@ -51,7 +51,7 @@ def broadcast(self: A) -> A:
@set_module("boost_histogram.axis")
class AxesTuple(tuple): # type: ignore[type-arg]
__slots__ = ()
_MGRIDOPTS: MGridOpts = {"sparse": True, "indexing": "ij"}
_MGRIDOPTS: ClassVar[MGridOpts] = {"sparse": True, "indexing": "ij"}

def __init__(self, __iterable: Iterable[Axis]) -> None:
for item in self:
Expand Down