|
25 | 25 |
|
26 | 26 |
|
27 | 27 | class IFileSystem(Protocol): |
28 | | - |
29 | 28 | protocol: "str | list" |
30 | 29 |
|
31 | | - def ls(self, path: str) -> Sequence[str]: |
32 | | - ... |
| 30 | + def ls(self, path: str) -> Sequence[str]: ... |
33 | 31 |
|
34 | | - def put(self) -> None: |
35 | | - ... |
| 32 | + def put(self) -> None: ... |
36 | 33 |
|
37 | | - def open(self, path: str, mode: str, *args, **kwargs) -> IOBase: |
38 | | - ... |
| 34 | + def open(self, path: str, mode: str, *args, **kwargs) -> IOBase: ... |
39 | 35 |
|
40 | | - def get(self) -> None: |
41 | | - ... |
| 36 | + def get(self) -> None: ... |
42 | 37 |
|
43 | | - def exists(self, path: str, **kwargs) -> bool: |
44 | | - ... |
| 38 | + def exists(self, path: str, **kwargs) -> bool: ... |
45 | 39 |
|
46 | | - def mkdir(self, path, create_parents=True, **kwargs) -> None: |
47 | | - ... |
| 40 | + def mkdir(self, path, create_parents=True, **kwargs) -> None: ... |
48 | 41 |
|
49 | | - def rm(self, path, recursive=False, maxdepth=None) -> None: |
50 | | - ... |
| 42 | + def rm(self, path, recursive=False, maxdepth=None) -> None: ... |
51 | 43 |
|
52 | | - def info(self, path): |
53 | | - ... |
| 44 | + def info(self, path): ... |
54 | 45 |
|
55 | 46 |
|
56 | 47 | class BaseBoard: |
@@ -163,9 +154,7 @@ def pin_meta(self, name, version: str = None) -> Meta: |
163 | 154 | path_meta = self.construct_path([*components, meta_name]) |
164 | 155 | f, local = self._open_pin_meta(path_meta) |
165 | 156 |
|
166 | | - meta = self.meta_factory.read_pin_yaml( |
167 | | - f, pin_name, selected_version, local=local |
168 | | - ) |
| 157 | + meta = self.meta_factory.read_pin_yaml(f, pin_name, selected_version, local=local) |
169 | 158 |
|
170 | 159 | return meta |
171 | 160 |
|
@@ -237,7 +226,6 @@ def _pin_store( |
237 | 226 | versioned: Optional[bool] = None, |
238 | 227 | created: Optional[datetime] = None, |
239 | 228 | ) -> Meta: |
240 | | - |
241 | 229 | if type == "feather": |
242 | 230 | warn_deprecated( |
243 | 231 | 'Writing pin type "feather" is unsupported. Switching type to "arrow".' |
@@ -299,9 +287,7 @@ def _pin_store( |
299 | 287 | "but that directory already exists." |
300 | 288 | ) |
301 | 289 |
|
302 | | - inform( |
303 | | - _log, f"Writing pin:\nName: {repr(pin_name)}\nVersion: {dst_version}" |
304 | | - ) |
| 290 | + inform(_log, f"Writing pin:\nName: {repr(pin_name)}\nVersion: {dst_version}") |
305 | 291 |
|
306 | 292 | res = self.fs.put(tmp_dir, dst_version_path, recursive=True) |
307 | 293 |
|
@@ -456,9 +442,7 @@ def pin_version_delete(self, name: str, version: str): |
456 | 442 | pin_version_path = self.construct_path([pin_name, version]) |
457 | 443 | self.fs.rm(pin_version_path, recursive=True) |
458 | 444 |
|
459 | | - def pin_versions_prune( |
460 | | - self, name, n: "int | None" = None, days: "int | None" = None |
461 | | - ): |
| 445 | + def pin_versions_prune(self, name, n: "int | None" = None, days: "int | None" = None): |
462 | 446 | """Delete old versions of a pin. |
463 | 447 |
|
464 | 448 | Parameters |
|
0 commit comments