diff --git a/dev/fsspec_inspector/generate_flavours.py b/dev/fsspec_inspector/generate_flavours.py index d1e6fbc..2bd95fb 100644 --- a/dev/fsspec_inspector/generate_flavours.py +++ b/dev/fsspec_inspector/generate_flavours.py @@ -336,6 +336,8 @@ def generate_class_source_code( s.append(f" {attr} = {value!r}") for attr in attributes: s.append(f" {attr} = {getattr(cls, attr)!r}") + if getattr(cls, "local_file", False): + s.append(" local_file = True") s.append("") for method in methods: s.append(inspect.getsource(getattr(cls, method))) diff --git a/upath/_flavour_sources.py b/upath/_flavour_sources.py index 16b8946..42f1008 100644 --- a/upath/_flavour_sources.py +++ b/upath/_flavour_sources.py @@ -140,6 +140,7 @@ class AsyncLocalFileSystemFlavour(AbstractFileSystemFlavour): protocol = () root_marker = '/' sep = '/' + local_file = True @classmethod def _strip_protocol(cls, path): @@ -622,6 +623,7 @@ class LocalFileSystemFlavour(AbstractFileSystemFlavour): protocol = ('file', 'local') root_marker = '/' sep = '/' + local_file = True @classmethod def _strip_protocol(cls, path): diff --git a/upath/tests/implementations/test_local.py b/upath/tests/implementations/test_local.py index 437c6f5..e3f59d4 100644 --- a/upath/tests/implementations/test_local.py +++ b/upath/tests/implementations/test_local.py @@ -3,11 +3,9 @@ from upath import UPath from upath.implementations.local import LocalPath from upath.tests.cases import BaseTests -from upath.tests.utils import skip_on_windows from upath.tests.utils import xfail_if_version -@skip_on_windows class TestFSSpecLocal(BaseTests): @pytest.fixture(autouse=True) def path(self, local_testdir): @@ -18,7 +16,6 @@ def test_is_LocalPath(self): assert isinstance(self.path, LocalPath) -@skip_on_windows @xfail_if_version("fsspec", lt="2023.10.0", reason="requires fsspec>=2023.10.0") class TestRayIOFSSpecLocal(BaseTests): @pytest.fixture(autouse=True)