@@ -321,9 +321,7 @@ def os(self) -> OSType:
321
321
return (
322
322
OSType .WINDOWS
323
323
if self .is_windows_fs
324
- else OSType .MACOS
325
- if self .is_macos
326
- else OSType .LINUX
324
+ else OSType .MACOS if self .is_macos else OSType .LINUX
327
325
)
328
326
329
327
@os .setter
@@ -930,9 +928,9 @@ def normpath(self, path: AnyStr) -> AnyStr:
930
928
path_components : List [AnyStr ] = path_str .split (
931
929
sep
932
930
) # pytype: disable=invalid-annotation
933
- collapsed_path_components : List [
934
- AnyStr
935
- ] = [] # pytype: disable=invalid-annotation
931
+ collapsed_path_components : List [AnyStr ] = (
932
+ []
933
+ ) # pytype: disable=invalid-annotation
936
934
dot = matching_string (path_str , "." )
937
935
dotdot = matching_string (path_str , ".." )
938
936
for component in path_components :
@@ -1220,12 +1218,10 @@ def joinpaths(self, *paths: AnyStr) -> AnyStr:
1220
1218
return matching_string (file_paths [0 ], "" ).join (joined_path_segments )
1221
1219
1222
1220
@overload
1223
- def _path_components (self , path : str ) -> List [str ]:
1224
- ...
1221
+ def _path_components (self , path : str ) -> List [str ]: ...
1225
1222
1226
1223
@overload
1227
- def _path_components (self , path : bytes ) -> List [bytes ]:
1228
- ...
1224
+ def _path_components (self , path : bytes ) -> List [bytes ]: ...
1229
1225
1230
1226
def _path_components (self , path : AnyStr ) -> List [AnyStr ]:
1231
1227
"""Breaks the path into a list of component names.
@@ -1888,9 +1884,7 @@ def _handle_broken_link_with_trailing_sep(self, path: AnyStr) -> None:
1888
1884
error = (
1889
1885
errno .ENOENT
1890
1886
if self .is_macos
1891
- else errno .EINVAL
1892
- if self .is_windows_fs
1893
- else errno .ENOTDIR
1887
+ else errno .EINVAL if self .is_windows_fs else errno .ENOTDIR
1894
1888
)
1895
1889
self .raise_os_error (error , path )
1896
1890
0 commit comments