-
Notifications
You must be signed in to change notification settings - Fork 45
Description
Not sure if I am doing this properly, but subclassing UPath is challenging, in part due to this check in the __new__ method:
I am curious if this could be changed to:
if issubclass(cls, UPath):This would return True even for issubclass(UPath, UPath).
Happy to submit a PR if you are ok with this change.
My surprisingly challenging attempt to subclass UPath to add some convenience methods has really grown my appreciation for what this project has accomplished.
On a related note, after digging deeper into the code, and exploring the pathlib implementation, I am wondering if UPath would benefit from having something like a _URI_Flavour derived from the pathlib._Flavour class. This might make it easier to have consistent path handling across the fsspec based implementations.