diff --git a/stdlib/pstats.pyi b/stdlib/pstats.pyi index d41fa202cf77..cd4b071e23a9 100644 --- a/stdlib/pstats.pyi +++ b/stdlib/pstats.pyi @@ -1,5 +1,5 @@ import sys -from _typeshed import StrOrBytesPath +from _typeshed import Incomplete, StrOrBytesPath from collections.abc import Iterable from cProfile import Profile as _cProfile from profile import Profile @@ -43,17 +43,18 @@ else: TIME = "time" if sys.version_info >= (3, 9): - from dataclasses import dataclass + from dataclasses import dataclass, field + # ruff: noqa: PYI015 @dataclass(unsafe_hash=True) class FunctionProfile: ncalls: str tottime: float percall_tottime: float cumtime: float - percall_cumtime: float - file_name: str - line_number: int + percall_cumtime: float = field(default=2) # noqa: Y015 + file_name: str = field(default_factory=Incomplete) # noqa: Y015 + line_number: int = field(kw_only=True) # noqa: Y015 @dataclass(unsafe_hash=True) class StatsProfile: