Use StrEnum as base class, when available (#11100)

This commit is contained in:
tungol
2023-12-05 04:27:10 -08:00
committed by GitHub
parent b5511ca648
commit fd7ff19577
7 changed files with 25 additions and 10 deletions

View File

@@ -1,8 +1,7 @@
import sys
from _typeshed import StrOrBytesPath
from _typeshed import StrEnum, StrOrBytesPath
from collections.abc import Iterable
from cProfile import Profile as _cProfile
from enum import Enum
from profile import Profile
from typing import IO, Any, overload
from typing_extensions import Literal, Self, TypeAlias
@@ -14,7 +13,7 @@ else:
_Selector: TypeAlias = str | float | int
class SortKey(str, Enum):
class SortKey(StrEnum):
CALLS: str
CUMULATIVE: str
FILENAME: str