Skip to content
Closed
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
11 changes: 6 additions & 5 deletions stdlib/pstats.pyi
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -43,17 +43,18 @@
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

Check failure on line 56 in stdlib/pstats.pyi

View workflow job for this annotation

GitHub Actions / Test typeshed with pyright (Linux, 3.12)

Type "Any" is not assignable to declared type "str"   "Any" is not assignable to "str" (reportAssignmentType)
line_number: int = field(kw_only=True) # noqa: Y015

@dataclass(unsafe_hash=True)
class StatsProfile:
Expand Down
Loading