11from types import CodeType , TracebackType , FrameType , FunctionType , MethodType , ModuleType
2- from typing import Any , Dict , Callable , List , NamedTuple , Optional , Sequence , Tuple , Type , Union
2+ from typing import Any , Dict , Callable , List , NamedTuple , Optional , Sequence , Tuple , Type , Union , AnyStr
33
44# Types and members
55class EndOfBlock (Exception ): ...
@@ -10,8 +10,8 @@ class BlockFinder:
1010 started : bool
1111 passline : bool
1212 last : int
13- def tokeneater (self , type : int , token : str , srow_scol : Tuple [int , int ],
14- erow_ecol : Tuple [int , int ], line : str ) -> None : ...
13+ def tokeneater (self , type : int , token : AnyStr , srow_scol : Tuple [int , int ],
14+ erow_ecol : Tuple [int , int ], line : AnyStr ) -> None : ...
1515
1616CO_GENERATOR : int
1717CO_NESTED : int
@@ -32,8 +32,8 @@ def getmembers(
3232 object : object ,
3333 predicate : Optional [Callable [[Any ], bool ]] = ...
3434) -> List [Tuple [str , Any ]]: ...
35- def getmoduleinfo (path : str ) -> Optional [ModuleInfo ]: ...
36- def getmodulename (path : str ) -> Optional [str ]: ...
35+ def getmoduleinfo (path : Union [ str , unicode ] ) -> Optional [ModuleInfo ]: ...
36+ def getmodulename (path : AnyStr ) -> Optional [AnyStr ]: ...
3737
3838def ismodule (object : object ) -> bool : ...
3939def isclass (object : object ) -> bool : ...
@@ -57,16 +57,16 @@ _SourceObjectType = Union[ModuleType, Type[Any], MethodType, FunctionType, Trace
5757
5858def findsource (object : _SourceObjectType ) -> Tuple [List [str ], int ]: ...
5959def getabsfile (object : _SourceObjectType ) -> str : ...
60- def getblock (lines : Sequence [str ]) -> Sequence [str ]: ...
60+ def getblock (lines : Sequence [AnyStr ]) -> Sequence [AnyStr ]: ...
6161def getdoc (object : object ) -> Optional [str ]: ...
6262def getcomments (object : object ) -> Optional [str ]: ...
6363def getfile (object : _SourceObjectType ) -> str : ...
6464def getmodule (object : object ) -> Optional [ModuleType ]: ...
6565def getsourcefile (object : _SourceObjectType ) -> Optional [str ]: ...
6666def getsourcelines (object : _SourceObjectType ) -> Tuple [List [str ], int ]: ...
6767def getsource (object : _SourceObjectType ) -> str : ...
68- def cleandoc (doc : str ) -> str : ...
69- def indentsize (line : str ) -> int : ...
68+ def cleandoc (doc : AnyStr ) -> AnyStr : ...
69+ def indentsize (line : Union [ str , unicode ] ) -> int : ...
7070
7171# Classes and functions
7272def getclasstree (classes : List [type ], unique : bool = ...) -> List [Union [Tuple [type , Tuple [type , ...]], List [Any ]]]: ...
0 commit comments