1- import re
21from collections .abc import Callable , Generator , Iterator , Sequence
32from re import Match , Pattern
43from typing import Any , Generic , TypeAlias , TypeVar , overload
@@ -95,7 +94,6 @@ class StateWS(State):
9594 ws_patterns : dict [str , str ]
9695 ws_initial_transitions : Sequence [str ]
9796 def __init__ (self , state_machine : StateMachine , debug : bool = False ) -> None : ...
98- patterns : dict [str , str | Pattern [str ]]
9997 def add_initial_transitions (self ) -> None : ...
10098 def blank (self , match : Match [str ], context : Any , next_state : str ) -> tuple [Any , str , Any ]: ...
10199 def indent (self , match : Match [str ], context : Any , next_state : str ) -> tuple [Any , str , Any ] | None : ...
@@ -164,6 +162,9 @@ class ViewList(Generic[_Data]):
164162 def xitems (self ) -> Generator [tuple [str , int , str ], None , None ]: ...
165163 def pprint (self ) -> None : ...
166164
165+ # dummy atribute to indicate to mypy that ViewList is Iterable[str]
166+ def __iter__ (self ) -> Iterator [str ]: ...
167+
167168class StringList (ViewList [str ]):
168169 def trim_left (self , length : int , start : int = ..., end : int = ...) -> None : ...
169170 def get_text_block (self , start : int , flush_left : bool = ...) -> StringList : ...
@@ -179,9 +180,6 @@ class StringList(ViewList[str]):
179180 def pad_double_width (self , pad_char : str ) -> None : ...
180181 def replace (self , old : str , new : str ) -> None : ...
181182
182- # dummy atribute to indicate to mypy that ViewList is Iterable[str]
183- def __iter__ (self ) -> Iterator [str ]: ...
184-
185183class StateMachineError (Exception ): ...
186184class UnknownStateError (StateMachineError ): ...
187185class DuplicateStateError (StateMachineError ): ...
0 commit comments