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 15
15
import threading
16
16
from abc import ABCMeta , abstractmethod
17
17
from asyncio import get_running_loop
18
- from typing import AsyncGenerator , Iterable , Sequence
18
+ from typing import AsyncGenerator , Iterable , Sequence , Union
19
19
20
20
__all__ = [
21
21
"History" ,
@@ -255,12 +255,15 @@ def append_string(self, string: str) -> None:
255
255
pass
256
256
257
257
258
+ _StrOrBytesPath = Union [str , bytes , "os.PathLike[str]" , "os.PathLike[bytes]" ]
259
+
260
+
258
261
class FileHistory (History ):
259
262
"""
260
263
:class:`.History` class that stores all strings in a file.
261
264
"""
262
265
263
- def __init__ (self , filename : str | os . PathLike ) -> None :
266
+ def __init__ (self , filename : _StrOrBytesPath ) -> None :
264
267
self .filename = filename
265
268
super ().__init__ ()
266
269
You can’t perform that action at this time.
0 commit comments