@@ -485,7 +485,7 @@ class slice(object):
485485 @overload
486486 def __init__ (self , stop : Optional [int ]) -> None : ...
487487 @overload
488- def __init__ (self , start : Optional [int ], stop : Optional [int ], step : int = None ) -> None : ...
488+ def __init__ (self , start : Optional [int ], stop : Optional [int ], step : Optional [ int ] = None ) -> None : ...
489489 def indices (self , len : int ) -> Tuple [int , int , int ]: ...
490490
491491class tuple (Sequence [_T_co ], Generic [_T_co ]):
@@ -676,13 +676,13 @@ class xrange(Sized, Iterable[int], Reversible[int]):
676676 def __reversed__ (self ) -> Iterator [int ]: ...
677677
678678class property (object ):
679- def __init__ (self , fget : Callable [[Any ], Any ] = None ,
680- fset : Callable [[Any , Any ], None ] = None ,
681- fdel : Callable [[Any ], None ] = None , doc : str = None ) -> None : ...
679+ def __init__ (self , fget : Optional [ Callable [[Any ], Any ] ] = None ,
680+ fset : Optional [ Callable [[Any , Any ], None ] ] = None ,
681+ fdel : Optional [ Callable [[Any ], None ]] = None , doc : Optional [ str ] = None ) -> None : ...
682682 def getter (self , fget : Callable [[Any ], Any ]) -> property : ...
683683 def setter (self , fset : Callable [[Any , Any ], None ]) -> property : ...
684684 def deleter (self , fdel : Callable [[Any ], None ]) -> property : ...
685- def __get__ (self , obj : Any , type : type = None ) -> Any : ...
685+ def __get__ (self , obj : Any , type : Optional [ type ] = None ) -> Any : ...
686686 def __set__ (self , obj : Any , value : Any ) -> None : ...
687687 def __delete__ (self , obj : Any ) -> None : ...
688688 def fget (self ) -> Any : ...
@@ -716,7 +716,7 @@ def filter(function: Callable[[_T], Any],
716716def filter (function : None ,
717717 iterable : Iterable [Optional [_T ]]) -> List [_T ]: ...
718718def format (o : object , format_spec : str = '' ) -> str : ... # TODO unicode
719- def getattr (o : Any , name : unicode , default : Any = None ) -> Any : ...
719+ def getattr (o : Any , name : unicode , default : Optional [ Any ] = None ) -> Any : ...
720720def hasattr (o : Any , name : unicode ) -> bool : ...
721721def hash (o : object ) -> int : ...
722722def hex (i : int ) -> str : ... # TODO __index__
@@ -941,12 +941,12 @@ class ResourceWarning(Warning): ...
941941
942942def eval (s : str , globals : Dict [str , Any ] = ..., locals : Dict [str , Any ] = ...) -> Any : ...
943943def exec (object : str ,
944- globals : Dict [str , Any ] = None ,
945- locals : Dict [str , Any ] = None ) -> Any : ... # TODO code object as source
944+ globals : Optional [ Dict [str , Any ] ] = None ,
945+ locals : Optional [ Dict [str , Any ] ] = None ) -> Any : ... # TODO code object as source
946946
947947def cmp (x : Any , y : Any ) -> int : ...
948948
949- def execfile (filename : str , globals : Dict [str , Any ] = None , locals : Dict [str , Any ] = None ) -> None : ...
949+ def execfile (filename : str , globals : Optional [ Dict [str , Any ]] = None , locals : Optional [ Dict [str , Any ] ] = None ) -> None : ...
950950
951951class file (BinaryIO ):
952952 @overload
@@ -958,7 +958,7 @@ class file(BinaryIO):
958958 def __iter__ (self ) -> Iterator [str ]: ...
959959 def read (self , n : int = ...) -> str : ...
960960 def __enter__ (self ) -> BinaryIO : ...
961- def __exit__ (self , t : type = None , exc : BaseException = None , tb : Any = None ) -> bool : ...
961+ def __exit__ (self , t : Optional [ type ] = None , exc : Optional [ BaseException ] = None , tb : Optional [ Any ] = None ) -> bool : ...
962962 def flush (self ) -> None : ...
963963 def fileno (self ) -> int : ...
964964 def isatty (self ) -> bool : ...
@@ -976,6 +976,6 @@ class file(BinaryIO):
976976 def truncate (self , pos : Optional [int ] = ...) -> int : ...
977977
978978# Very old builtins
979- def apply (func : Callable [..., _T ], args : Sequence [Any ] = None , kwds : Mapping [str , Any ] = None ) -> _T : ...
979+ def apply (func : Callable [..., _T ], args : Optional [ Sequence [Any ]] = None , kwds : Optional [ Mapping [str , Any ] ] = None ) -> _T : ...
980980_N = TypeVar ('_N' , bool , int , float , complex )
981981def coerce (x : _N , y : _N ) -> Tuple [_N , _N ]: ...
0 commit comments