diff options
Diffstat (limited to 'Lib/pstats.py')
-rw-r--r-- | Lib/pstats.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/pstats.py b/Lib/pstats.py index 0f93ae02c95..e77459d38b3 100644 --- a/Lib/pstats.py +++ b/Lib/pstats.py @@ -26,14 +26,15 @@ import time import marshal import re -from enum import Enum +from enum import StrEnum, _simple_enum from functools import cmp_to_key from dataclasses import dataclass from typing import Dict __all__ = ["Stats", "SortKey", "FunctionProfile", "StatsProfile"] -class SortKey(str, Enum): +@_simple_enum(StrEnum) +class SortKey: CALLS = 'calls', 'ncalls' CUMULATIVE = 'cumulative', 'cumtime' FILENAME = 'filename', 'module' |