We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e069e7 commit 2839ad0Copy full SHA for 2839ad0
util/vfs.py
@@ -1,5 +1,6 @@
1
import os
2
from pathlib import Path
3
+from typing import Union
4
5
6
class Vfs:
@@ -13,7 +14,7 @@ def __init__(self):
13
14
self.files: dict[str, VirtualFile] = dict()
15
self.files_to_delete: set[Path] = set()
16
- def delete_glob(self, directory: str | Path, glob: str):
17
+ def delete_glob(self, directory: Union[str, Path], glob: str):
18
"""
19
Glob for all files on disk that were created by the previous build.
20
These files should be deleted if this build does not emit them.
@@ -39,7 +40,7 @@ def write(self):
39
40
print(f"Deleting {path}")
41
os.remove(path)
42
- def exists(self, path: str | Path):
43
+ def exists(self, path: Union[str, Path]):
44
return str(path) in self.files
45
46
def open(self, path: str | Path, mode: str):
0 commit comments