@@ -2,6 +2,10 @@ from _typeshed import StrOrBytesPath
22from collections .abc import Callable
33from contextlib import AbstractContextManager
44from typing import IO , Any , AnyStr
5+ from typing_extensions import Literal
6+
7+ PY2 : Literal [False ]
8+ DEFAULT_MODE : Literal ["w" ]
59
610def replace_atomic (src : AnyStr , dst : AnyStr ) -> None : ...
711def move_atomic (src : AnyStr , dst : AnyStr ) -> None : ...
@@ -10,7 +14,9 @@ class AtomicWriter:
1014 def __init__ (self , path : StrOrBytesPath , mode : str = ..., overwrite : bool = ...) -> None : ...
1115 def open (self ) -> AbstractContextManager [IO [Any ]]: ...
1216 def _open (self , get_fileobject : Callable [..., IO [AnyStr ]]) -> AbstractContextManager [IO [AnyStr ]]: ...
13- def get_fileobject (self , dir : StrOrBytesPath | None = ..., ** kwargs : Any ) -> IO [Any ]: ...
17+ def get_fileobject (
18+ self , suffix : str = ..., prefix : str = ..., dir : StrOrBytesPath | None = ..., ** kwargs : Any
19+ ) -> IO [Any ]: ...
1420 def sync (self , f : IO [Any ]) -> None : ...
1521 def commit (self , f : IO [Any ]) -> None : ...
1622 def rollback (self , f : IO [Any ]) -> None : ...
0 commit comments