Skip to content

Commit 8e9a37d

Browse files
authored
Fix type annotation of pstats.FunctionProfile.ncalls (#96741)
* fix: annotate `pstats.FunctionProfile.ncalls` as `str` This change aligns the type annotation of `pstats.FunctionProfile.ncalls` with its runtime type.
1 parent a83fdf2 commit 8e9a37d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Lib/pstats.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def __new__(cls, *values):
5757

5858
@dataclass(unsafe_hash=True)
5959
class FunctionProfile:
60-
ncalls: int
60+
ncalls: str
6161
tottime: float
6262
percall_tottime: float
6363
cumtime: float
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Corrected type annotation for dataclass attribute ``pstats.FunctionProfile.ncalls`` to be ``str``.

0 commit comments

Comments
 (0)