@@ -64,8 +64,6 @@ def __init__(
6464 indent : int = 4 ,
6565 width : int = 80 ,
6666 depth : Optional [int ] = None ,
67- * ,
68- underscore_numbers : bool = False ,
6967 ) -> None :
7068 """Handle pretty printing operations onto a stream using a set of
7169 configured parameters.
@@ -91,7 +89,6 @@ def __init__(
9189 self ._depth = depth
9290 self ._indent_per_level = indent
9391 self ._width = width
94- self ._underscore_numbers = underscore_numbers
9592
9693 def pformat (self , object : Any ) -> str :
9794 sio = _StringIO ()
@@ -603,12 +600,6 @@ def _safe_repr(
603600
604601 r = getattr (typ , "__repr__" , None )
605602
606- if issubclass (typ , int ) and r is int .__repr__ :
607- if self ._underscore_numbers :
608- return f"{ object :_d} "
609- else :
610- return repr (object )
611-
612603 if issubclass (typ , dict ) and r is dict .__repr__ :
613604 if not object :
614605 return "{}"
@@ -659,7 +650,9 @@ def _safe_repr(
659650 return repr (object )
660651
661652
662- _builtin_scalars = frozenset ({str , bytes , bytearray , float , complex , bool , type (None )})
653+ _builtin_scalars = frozenset (
654+ {str , bytes , bytearray , float , complex , bool , type (None ), int }
655+ )
663656
664657
665658def _recursion (object : Any ) -> str :
0 commit comments