Skip to content

Commit 689c621

Browse files
committed
fix: revert strenum change
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 8c4ebfa commit 689c621

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/boost_histogram/histogram.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,13 @@
5555
raise new_exception from err
5656

5757

58-
class Kind(enum.StrEnum):
58+
# This is a StrEnum as defined in Python 3.11
59+
class Kind(str, enum.Enum):
5960
COUNT = "COUNT"
6061
MEAN = "MEAN"
6162

63+
__str__ = str.__str__
64+
6265

6366
__all__ = [
6467
"Histogram",

src/boost_histogram/typing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from __future__ import annotations
22

33
from typing import TYPE_CHECKING, Any, Protocol, TypeAlias
4+
from types import EllipsisType
45

56
if TYPE_CHECKING:
67
from collections.abc import Sequence
7-
from types import EllipsisType
88

99
from numpy import ufunc as Ufunc
1010
from numpy.typing import ArrayLike

0 commit comments

Comments
 (0)