File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1111try :
1212 from os import chmod # pyright: ignore[reportAssignmentType]
1313 # Losing type-safety w/ pyright, but that's ok
14- except ImportError :
14+ except ImportError : # pragma: no cover
1515 # Jython compatibility
1616 def chmod (* args : object , ** kwargs : object ) -> None : # type: ignore[misc] # Mypy reuses the imported definition anyway
1717 pass
@@ -24,12 +24,14 @@ def attempt_chmod_verbose(path, mode):
2424 log .debug ("changing mode of %s to %o" , path , mode )
2525 try :
2626 chmod (path , mode )
27- except OSError as e :
27+ except OSError as e : # pragma: no cover
2828 log .debug ("chmod failed: %s" , e )
2929
3030
3131# Must match shutil._OnExcCallback
32- def _auto_chmod (func : Callable [..., _T ], arg : str , exc : BaseException ) -> _T :
32+ def _auto_chmod (
33+ func : Callable [..., _T ], arg : str , exc : BaseException
34+ ) -> _T : # pragma: no cover
3335 """shutils onexc callback to automatically call chmod for certain functions."""
3436 # Only retry for scenarios known to have an issue
3537 if func in [os .unlink , os .remove ] and os .name == 'nt' :
You can’t perform that action at this time.
0 commit comments