From 2ce1844905eb0b138378bb0436ea40748b0193fa Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Sat, 12 Feb 2022 22:51:29 +0300 Subject: [PATCH] Fix `context` type in `pprint.PrettyPrinter.format` (#7179) Co-authored-by: Jelle Zijlstra --- stdlib/pprint.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/pprint.pyi b/stdlib/pprint.pyi index 1c88793ba..9d2167007 100644 --- a/stdlib/pprint.pyi +++ b/stdlib/pprint.pyi @@ -1,5 +1,5 @@ import sys -from typing import IO, Any +from typing import IO if sys.version_info >= (3, 10): def pformat( @@ -131,4 +131,4 @@ class PrettyPrinter: def pprint(self, object: object) -> None: ... def isreadable(self, object: object) -> bool: ... def isrecursive(self, object: object) -> bool: ... - def format(self, object: object, context: dict[int, Any], maxlevels: int, level: int) -> tuple[str, bool, bool]: ... + def format(self, object: object, context: dict[int, int], maxlevels: int, level: int) -> tuple[str, bool, bool]: ...