File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -745,16 +745,15 @@ def stat( # type: ignore[override]
745745 ) -> UPathStatResult :
746746 if not follow_symlinks :
747747 warnings .warn (
748- "UPath. stat(follow_symlinks=False): follow_symlinks=False is "
749- " currently ignored." ,
748+ f" { type ( self ). __name__ } . stat(follow_symlinks=False):"
749+ " is currently ignored." ,
750750 UserWarning ,
751751 stacklevel = 2 ,
752752 )
753753 return UPathStatResult .from_info (self .fs .stat (self .path ))
754754
755755 def lstat (self ) -> UPathStatResult : # type: ignore[override]
756- # return self.stat(follow_symlinks=False)
757- raise NotImplementedError
756+ return self .stat (follow_symlinks = False )
758757
759758 def exists (self , * , follow_symlinks = True ) -> bool :
760759 return self .fs .exists (self .path )
Original file line number Diff line number Diff line change @@ -61,8 +61,8 @@ def is_dir(self):
6161 def stat (self , follow_symlinks : bool = True ):
6262 if not follow_symlinks :
6363 warnings .warn (
64- "HTTPPath. stat(follow_symlinks=False): follow_symlinks=False is "
65- " currently ignored." ,
64+ f" { type ( self ). __name__ } . stat(follow_symlinks=False):"
65+ " is currently ignored." ,
6666 UserWarning ,
6767 stacklevel = 2 ,
6868 )
Original file line number Diff line number Diff line change @@ -181,8 +181,9 @@ def test_lchmod(self):
181181 self .path .lchmod (mode = 77 )
182182
183183 def test_lstat (self ):
184- with pytest .raises (NotImplementedError ):
185- self .path .lstat ()
184+ with pytest .warns (UserWarning , match = r"[A-Za-z]+.stat" ):
185+ st = self .path .lstat ()
186+ assert st is not None
186187
187188 def test_mkdir (self ):
188189 new_dir = self .path .joinpath ("new_dir" )
You can’t perform that action at this time.
0 commit comments