File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1515import threading
1616from abc import ABCMeta , abstractmethod
1717from asyncio import get_running_loop
18- from typing import AsyncGenerator , Iterable , Sequence
18+ from typing import AsyncGenerator , Iterable , Sequence , Union
1919
2020__all__ = [
2121 "History" ,
@@ -255,12 +255,15 @@ def append_string(self, string: str) -> None:
255255 pass
256256
257257
258+ _StrOrBytesPath = Union [str , bytes , "os.PathLike[str]" , "os.PathLike[bytes]" ]
259+
260+
258261class FileHistory (History ):
259262 """
260263 :class:`.History` class that stores all strings in a file.
261264 """
262265
263- def __init__ (self , filename : str | os . PathLike ) -> None :
266+ def __init__ (self , filename : _StrOrBytesPath ) -> None :
264267 self .filename = filename
265268 super ().__init__ ()
266269
You can’t perform that action at this time.
0 commit comments