Skip to content

Commit

Permalink
DNM: Test dataclasses.field assignments in stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p committed Jan 19, 2025
1 parent c01e731 commit 7c56822
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions stdlib/pstats.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ else:
TIME = "time"

if sys.version_info >= (3, 9):
from dataclasses import dataclass
from dataclasses import dataclass, field

@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)
file_name: str = field(default_factory=str)
line_number: int = field(kw_only=True)

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

0 comments on commit 7c56822

Please sign in to comment.