mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
pstats.FunctionProfile.ncalls should be str (#8712)
Correctly annotate `pstats.FunctionProfile.ncalls` as `str` instead of `int`. Since this change introduces a difference between typeshed and CPython, add a comment pointing that out and linking to this PR. Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -30,7 +30,8 @@ if sys.version_info >= (3, 9):
|
||||
|
||||
@dataclass(unsafe_hash=True)
|
||||
class FunctionProfile:
|
||||
ncalls: int
|
||||
# Note: the annotation in the CPython codebase is "int", but the annotation in CPython is wrong! See #8712
|
||||
ncalls: str
|
||||
tottime: float
|
||||
percall_tottime: float
|
||||
cumtime: float
|
||||
|
||||
Reference in New Issue
Block a user