You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lots of Python codebases use os.PathLike to indicate a file that can be read/opened/etc. We want CloudPath to be treated like a path in these instances so that when it is passed to other libraries they call trust its .open() method and work with the file content as expected.
In a previous iteration, we had inherited from the PurePath type as below, which I believe made this work. There may be other implementation options as well:
Activity
jayqi commentedon Sep 2, 2020
This actually looks like it's pretty easy. All we have to do is add an
__fspath__instance method.https://docs.python.org/3/library/os.html#os.PathLike