@@ -921,7 +921,7 @@ def __str__(self) -> str:
921921 def __repr__ (self ) -> str :
922922 return "<{} instance at {:0x}>" .format (self .__class__ , id (self ))
923923
924- def toterminal (self , tw ) -> None :
924+ def toterminal (self , tw : py . io . TerminalWriter ) -> None :
925925 raise NotImplementedError ()
926926
927927
@@ -932,7 +932,7 @@ def __init__(self) -> None:
932932 def addsection (self , name : str , content : str , sep : str = "-" ) -> None :
933933 self .sections .append ((name , content , sep ))
934934
935- def toterminal (self , tw ) -> None :
935+ def toterminal (self , tw : py . io . TerminalWriter ) -> None :
936936 for name , content , sep in self .sections :
937937 tw .sep (sep , name )
938938 tw .line (content )
@@ -952,7 +952,7 @@ def __init__(
952952 self .reprtraceback = chain [- 1 ][0 ]
953953 self .reprcrash = chain [- 1 ][1 ]
954954
955- def toterminal (self , tw ) -> None :
955+ def toterminal (self , tw : py . io . TerminalWriter ) -> None :
956956 for element in self .chain :
957957 element [0 ].toterminal (tw )
958958 if element [2 ] is not None :
@@ -969,7 +969,7 @@ def __init__(
969969 self .reprtraceback = reprtraceback
970970 self .reprcrash = reprcrash
971971
972- def toterminal (self , tw ) -> None :
972+ def toterminal (self , tw : py . io . TerminalWriter ) -> None :
973973 self .reprtraceback .toterminal (tw )
974974 super ().toterminal (tw )
975975
@@ -987,7 +987,7 @@ def __init__(
987987 self .extraline = extraline
988988 self .style = style
989989
990- def toterminal (self , tw ) -> None :
990+ def toterminal (self , tw : py . io . TerminalWriter ) -> None :
991991 # the entries might have different styles
992992 for i , entry in enumerate (self .reprentries ):
993993 if entry .style == "long" :
@@ -1019,7 +1019,7 @@ class ReprEntryNative(TerminalRepr):
10191019 def __init__ (self , tblines : Sequence [str ]) -> None :
10201020 self .lines = tblines
10211021
1022- def toterminal (self , tw ) -> None :
1022+ def toterminal (self , tw : py . io . TerminalWriter ) -> None :
10231023 tw .write ("" .join (self .lines ))
10241024
10251025
@@ -1038,7 +1038,7 @@ def __init__(
10381038 self .reprfileloc = filelocrepr
10391039 self .style = style
10401040
1041- def toterminal (self , tw ) -> None :
1041+ def toterminal (self , tw : py . io . TerminalWriter ) -> None :
10421042 if self .style == "short" :
10431043 assert self .reprfileloc is not None
10441044 self .reprfileloc .toterminal (tw )
@@ -1071,7 +1071,7 @@ def __init__(self, path, lineno: int, message: str) -> None:
10711071 self .lineno = lineno
10721072 self .message = message
10731073
1074- def toterminal (self , tw ) -> None :
1074+ def toterminal (self , tw : py . io . TerminalWriter ) -> None :
10751075 # filename and lineno output for each entry,
10761076 # using an output format that most editors understand
10771077 msg = self .message
@@ -1086,7 +1086,7 @@ class ReprLocals(TerminalRepr):
10861086 def __init__ (self , lines : Sequence [str ]) -> None :
10871087 self .lines = lines
10881088
1089- def toterminal (self , tw ) -> None :
1089+ def toterminal (self , tw : py . io . TerminalWriter ) -> None :
10901090 for line in self .lines :
10911091 tw .line (line )
10921092
@@ -1095,7 +1095,7 @@ class ReprFuncArgs(TerminalRepr):
10951095 def __init__ (self , args : Sequence [Tuple [str , object ]]) -> None :
10961096 self .args = args
10971097
1098- def toterminal (self , tw ) -> None :
1098+ def toterminal (self , tw : py . io . TerminalWriter ) -> None :
10991099 if self .args :
11001100 linesofar = ""
11011101 for name , value in self .args :
0 commit comments