pyglove 0.4.5.dev202503130809__py3-none-any.whl → 0.4.5.dev202503150808__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyglove/core/io/file_system.py +4 -4
- pyglove/core/io/file_system_test.py +2 -2
- {pyglove-0.4.5.dev202503130809.dist-info → pyglove-0.4.5.dev202503150808.dist-info}/METADATA +1 -1
- {pyglove-0.4.5.dev202503130809.dist-info → pyglove-0.4.5.dev202503150808.dist-info}/RECORD +7 -7
- {pyglove-0.4.5.dev202503130809.dist-info → pyglove-0.4.5.dev202503150808.dist-info}/LICENSE +0 -0
- {pyglove-0.4.5.dev202503130809.dist-info → pyglove-0.4.5.dev202503150808.dist-info}/WHEEL +0 -0
- {pyglove-0.4.5.dev202503130809.dist-info → pyglove-0.4.5.dev202503150808.dist-info}/top_level.txt +0 -0
pyglove/core/io/file_system.py
CHANGED
@@ -99,7 +99,7 @@ class FileSystem(metaclass=abc.ABCMeta):
|
|
99
99
|
self,
|
100
100
|
path: Union[str, os.PathLike[str]],
|
101
101
|
mode: int = 0o777,
|
102
|
-
exist_ok: bool =
|
102
|
+
exist_ok: bool = True,
|
103
103
|
) -> None:
|
104
104
|
"""Makes a directory chain based on a path."""
|
105
105
|
|
@@ -185,7 +185,7 @@ class StdFileSystem(FileSystem):
|
|
185
185
|
self,
|
186
186
|
path: Union[str, os.PathLike[str]],
|
187
187
|
mode: int = 0o777,
|
188
|
-
exist_ok: bool =
|
188
|
+
exist_ok: bool = True,
|
189
189
|
) -> None:
|
190
190
|
os.makedirs(path, mode, exist_ok)
|
191
191
|
|
@@ -309,7 +309,7 @@ class MemoryFileSystem(FileSystem):
|
|
309
309
|
self,
|
310
310
|
path: Union[str, os.PathLike[str]],
|
311
311
|
mode: int = 0o777,
|
312
|
-
exist_ok: bool =
|
312
|
+
exist_ok: bool = True,
|
313
313
|
) -> None:
|
314
314
|
del mode
|
315
315
|
current = self._root
|
@@ -472,7 +472,7 @@ def mkdir(path: Union[str, os.PathLike[str]], mode: int = 0o777) -> None:
|
|
472
472
|
def mkdirs(
|
473
473
|
path: Union[str, os.PathLike[str]],
|
474
474
|
mode: int = 0o777,
|
475
|
-
exist_ok: bool =
|
475
|
+
exist_ok: bool = True,
|
476
476
|
) -> None:
|
477
477
|
"""Makes a directory chain."""
|
478
478
|
_fs.get(path).mkdirs(path, mode=mode, exist_ok=exist_ok)
|
@@ -140,9 +140,9 @@ class MemoryFileSystemTest(unittest.TestCase):
|
|
140
140
|
# Make dirs.
|
141
141
|
fs.mkdirs(os.path.join(dir_a, 'b/c/d'))
|
142
142
|
|
143
|
+
fs.mkdirs(os.path.join(dir_a, 'b/c/d'))
|
143
144
|
with self.assertRaises(FileExistsError):
|
144
|
-
fs.mkdirs(os.path.join(dir_a, 'b/c/d'))
|
145
|
-
fs.mkdirs(os.path.join(dir_a, 'b/c/d'), exist_ok=True)
|
145
|
+
fs.mkdirs(os.path.join(dir_a, 'b/c/d'), exist_ok=False)
|
146
146
|
with self.assertRaises(NotADirectoryError):
|
147
147
|
fs.mkdirs(os.path.join(file1, 'e'))
|
148
148
|
|
@@ -54,8 +54,8 @@ pyglove/core/hyper/numerical_test.py,sha256=UWdH55Bok7bghYDLJOGsgOwV_2LNkhj1AmFw
|
|
54
54
|
pyglove/core/hyper/object_template.py,sha256=YPALTV0mMULa7iuqnryTpA2wMsdyFZ_6g-R525asAr8,22222
|
55
55
|
pyglove/core/hyper/object_template_test.py,sha256=TEFX7LIqUvdCdJILnK_gP5xIgNJKzRnioUF0CGVBzcY,9105
|
56
56
|
pyglove/core/io/__init__.py,sha256=4ZT1a595DqQuLTNYc2JP_eCp_KesXvHmKRkr777bzpg,785
|
57
|
-
pyglove/core/io/file_system.py,sha256=
|
58
|
-
pyglove/core/io/file_system_test.py,sha256=
|
57
|
+
pyglove/core/io/file_system.py,sha256=CKb8wpXnoH9VHhY5LzOkUakSdBF3gshLkGxNZBUoZNM,13386
|
58
|
+
pyglove/core/io/file_system_test.py,sha256=quJ74i7uEw7aaNIW6steIvn5VKrei5qOLJuOa4Og64w,8692
|
59
59
|
pyglove/core/io/sequence.py,sha256=7QWMGXPtJzHyGPgqkT3yJ01FxKJ4mP4lF5HRDiIHNbQ,8165
|
60
60
|
pyglove/core/io/sequence_test.py,sha256=6tmnS7frBuDR8ussT5jugeh23TDsPDrDnbfxHh81Gy4,3891
|
61
61
|
pyglove/core/patching/__init__.py,sha256=C1Q1cWPV74YL3eXbzGvc-8aPw1DR8EK6lRhQYDCwHek,2059
|
@@ -212,8 +212,8 @@ pyglove/ext/scalars/randoms.py,sha256=LkMIIx7lOq_lvJvVS3BrgWGuWl7Pi91-lA-O8x_gZs
|
|
212
212
|
pyglove/ext/scalars/randoms_test.py,sha256=nEhiqarg8l_5EOucp59CYrpO2uKxS1pe0hmBdZUzRNM,2000
|
213
213
|
pyglove/ext/scalars/step_wise.py,sha256=IDw3tuTpv0KVh7AN44W43zqm1-E0HWPUlytWOQC9w3Y,3789
|
214
214
|
pyglove/ext/scalars/step_wise_test.py,sha256=TL1vJ19xVx2t5HKuyIzGoogF7N3Rm8YhLE6JF7i0iy8,2540
|
215
|
-
pyglove-0.4.5.
|
216
|
-
pyglove-0.4.5.
|
217
|
-
pyglove-0.4.5.
|
218
|
-
pyglove-0.4.5.
|
219
|
-
pyglove-0.4.5.
|
215
|
+
pyglove-0.4.5.dev202503150808.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
216
|
+
pyglove-0.4.5.dev202503150808.dist-info/METADATA,sha256=0lKcke94Ibzw0jDkYlbm_E_zsmqA8pqXCT5Lv_-qyZM,7067
|
217
|
+
pyglove-0.4.5.dev202503150808.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
218
|
+
pyglove-0.4.5.dev202503150808.dist-info/top_level.txt,sha256=wITzJSKcj8GZUkbq-MvUQnFadkiuAv_qv5qQMw0fIow,8
|
219
|
+
pyglove-0.4.5.dev202503150808.dist-info/RECORD,,
|
File without changes
|
File without changes
|
{pyglove-0.4.5.dev202503130809.dist-info → pyglove-0.4.5.dev202503150808.dist-info}/top_level.txt
RENAMED
File without changes
|