-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft: feat: introduce HFPath #422
base: main
Are you sure you want to change the base?
Conversation
from datetime import datetime | ||
from typing import IO, BinaryIO, Callable, Iterator, List, Optional, Tuple | ||
|
||
import fsspec |
Check failure
Code scanning / Pyre
Type Error Error
|
||
class BaseFSSpecPath(URIPath): | ||
protocol: str | ||
filesystem: fsspec.AbstractFileSystem |
Check failure
Code scanning / Pyre
Type Error Error
|
||
:returns: All contents have in the path in ascending alphabetical order | ||
""" | ||
entries = list(self.scandir(followlinks=followlinks)) |
Check failure
Code scanning / Pyre
Type Error Error
self.path_without_protocol, dst_path, recursive=True | ||
) | ||
|
||
def rename(self, dst_path: PathLike, overwrite: bool = True) -> "BaseFSSpecPath": |
Check failure
Code scanning / Pyre
Type Error Error
""" | ||
self.filesystem.mv(self.path_without_protocol, dst_path, recursive=False) | ||
|
||
def move(self, dst_path: PathLike, overwrite: bool = True) -> "BaseFSSpecPath": |
Check failure
Code scanning / Pyre
Type Error Error
|
||
|
||
class cached_classproperty(cached_property): | ||
def __get__(self, instance, cls) -> object: |
Check failure
Code scanning / Pyre
Type Error Error
|
||
|
||
class cached_classproperty(cached_property): | ||
def __get__(self, instance, cls) -> object: |
Check failure
Code scanning / Pyre
Type Error Error
|
||
|
||
class cached_classproperty(cached_property): | ||
def __get__(self, instance, cls) -> object: |
Check failure
Code scanning / Pyre
Type Error Error
) | ||
val = getattr(cls, self.attrname, self) | ||
if val is self: | ||
with self.lock: |
Check failure
Code scanning / Pyre
Type Error Error
val = getattr(cls, self.attrname, self) | ||
if val is self: | ||
val = self.func(cls) | ||
setattr(cls, self.attrname, val) |
Check failure
Code scanning / Pyre
Type Error Error
TODO: