From e01103512639b6f89b2ea16d4f3e073d1ba8a85d Mon Sep 17 00:00:00 2001 From: sobolevn Date: Thu, 30 Mar 2023 15:09:13 +0300 Subject: [PATCH 1/2] Remove useless overloads from `sys.getsizeof` --- stdlib/sys.pyi | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/stdlib/sys.pyi b/stdlib/sys.pyi index 6e97fbb328b2..5cda40ebe467 100644 --- a/stdlib/sys.pyi +++ b/stdlib/sys.pyi @@ -239,10 +239,7 @@ def getfilesystemencoding() -> str: ... def getfilesystemencodeerrors() -> str: ... def getrefcount(__object: Any) -> int: ... def getrecursionlimit() -> int: ... -@overload -def getsizeof(obj: object) -> int: ... -@overload -def getsizeof(obj: object, default: int) -> int: ... +def getsizeof(obj: object, default: int = ...) -> int: ... def getswitchinterval() -> float: ... def getprofile() -> ProfileFunction | None: ... def setprofile(profilefunc: ProfileFunction | None) -> None: ... From cecacb0b867b6a3edfbd3beb3eb4936fecd02573 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 30 Mar 2023 12:13:05 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks --- stdlib/sys.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/sys.pyi b/stdlib/sys.pyi index 5cda40ebe467..7dba4603b2ed 100644 --- a/stdlib/sys.pyi +++ b/stdlib/sys.pyi @@ -6,7 +6,7 @@ from importlib.abc import PathEntryFinder from importlib.machinery import ModuleSpec from io import TextIOWrapper from types import FrameType, ModuleType, TracebackType -from typing import Any, NoReturn, Protocol, TextIO, TypeVar, overload +from typing import Any, NoReturn, Protocol, TextIO, TypeVar from typing_extensions import Final, Literal, TypeAlias, final _T = TypeVar("_T")