File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -336,6 +336,8 @@ def generate_class_source_code(
336336 s .append (f" { attr } = { value !r} " )
337337 for attr in attributes :
338338 s .append (f" { attr } = { getattr (cls , attr )!r} " )
339+ if getattr (cls , "local_file" , False ):
340+ s .append (" local_file = True" )
339341 s .append ("" )
340342 for method in methods :
341343 s .append (inspect .getsource (getattr (cls , method )))
Original file line number Diff line number Diff line change @@ -140,6 +140,7 @@ class AsyncLocalFileSystemFlavour(AbstractFileSystemFlavour):
140140 protocol = ()
141141 root_marker = '/'
142142 sep = '/'
143+ local_file = True
143144
144145 @classmethod
145146 def _strip_protocol (cls , path ):
@@ -622,6 +623,7 @@ class LocalFileSystemFlavour(AbstractFileSystemFlavour):
622623 protocol = ('file' , 'local' )
623624 root_marker = '/'
624625 sep = '/'
626+ local_file = True
625627
626628 @classmethod
627629 def _strip_protocol (cls , path ):
Original file line number Diff line number Diff line change 33from upath import UPath
44from upath .implementations .local import LocalPath
55from upath .tests .cases import BaseTests
6- from upath .tests .utils import skip_on_windows
76from upath .tests .utils import xfail_if_version
87
98
10- @skip_on_windows
119class TestFSSpecLocal (BaseTests ):
1210 @pytest .fixture (autouse = True )
1311 def path (self , local_testdir ):
@@ -18,7 +16,6 @@ def test_is_LocalPath(self):
1816 assert isinstance (self .path , LocalPath )
1917
2018
21- @skip_on_windows
2219@xfail_if_version ("fsspec" , lt = "2023.10.0" , reason = "requires fsspec>=2023.10.0" )
2320class TestRayIOFSSpecLocal (BaseTests ):
2421 @pytest .fixture (autouse = True )
You can’t perform that action at this time.
0 commit comments