From d0b15044090c821d581de8d361fc965b7512b1a0 Mon Sep 17 00:00:00 2001 From: Ruan Comelli Date: Sat, 10 Sep 2022 13:58:50 -0300 Subject: [PATCH 1/4] fix: annotate `pstats.FunctionProfile.ncalls` as `str` This change aligns the type annotation of `pstats.FunctionProfile.ncalls` with its runtime type. --- Lib/pstats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/pstats.py b/Lib/pstats.py index 8e0743f2e5f29d..80408313e8b27f 100644 --- a/Lib/pstats.py +++ b/Lib/pstats.py @@ -57,7 +57,7 @@ def __new__(cls, *values): @dataclass(unsafe_hash=True) class FunctionProfile: - ncalls: int + ncalls: str tottime: float percall_tottime: float cumtime: float From 847488acec9b36a1a3e4247b226a86ca6c836317 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Sat, 10 Sep 2022 17:21:42 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Library/2022-09-10-17-21-41.gh-issue--.xchpJD.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Library/2022-09-10-17-21-41.gh-issue--.xchpJD.rst diff --git a/Misc/NEWS.d/next/Library/2022-09-10-17-21-41.gh-issue--.xchpJD.rst b/Misc/NEWS.d/next/Library/2022-09-10-17-21-41.gh-issue--.xchpJD.rst new file mode 100644 index 00000000000000..9ab67175f16e8e --- /dev/null +++ b/Misc/NEWS.d/next/Library/2022-09-10-17-21-41.gh-issue--.xchpJD.rst @@ -0,0 +1 @@ +Correctly annotate ``pstats.FunctionProfile.ncalls`` as ``str`` From 5b4929bb8015b49f478274efae25b050002c69d3 Mon Sep 17 00:00:00 2001 From: Ruan Comelli Date: Sat, 10 Sep 2022 14:23:28 -0300 Subject: [PATCH 3/4] Remove news file added by `blurb_it` --- .../next/Library/2022-09-10-17-21-41.gh-issue--.xchpJD.rst | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Misc/NEWS.d/next/Library/2022-09-10-17-21-41.gh-issue--.xchpJD.rst diff --git a/Misc/NEWS.d/next/Library/2022-09-10-17-21-41.gh-issue--.xchpJD.rst b/Misc/NEWS.d/next/Library/2022-09-10-17-21-41.gh-issue--.xchpJD.rst deleted file mode 100644 index 9ab67175f16e8e..00000000000000 --- a/Misc/NEWS.d/next/Library/2022-09-10-17-21-41.gh-issue--.xchpJD.rst +++ /dev/null @@ -1 +0,0 @@ -Correctly annotate ``pstats.FunctionProfile.ncalls`` as ``str`` From 4070a308d50a033c88b88c85db9546ebacabd80f Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Thu, 15 Sep 2022 00:37:34 +0000 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Library/2022-09-15-00-37-33.gh-issue-96741.4b6czN.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Library/2022-09-15-00-37-33.gh-issue-96741.4b6czN.rst diff --git a/Misc/NEWS.d/next/Library/2022-09-15-00-37-33.gh-issue-96741.4b6czN.rst b/Misc/NEWS.d/next/Library/2022-09-15-00-37-33.gh-issue-96741.4b6czN.rst new file mode 100644 index 00000000000000..e7f53311e589f2 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2022-09-15-00-37-33.gh-issue-96741.4b6czN.rst @@ -0,0 +1 @@ +Corrected type annotation for dataclass attribute ``pstats.FunctionProfile.ncalls`` to be ``str``.