@@ -1895,7 +1895,7 @@ def _extract_resource(self, manager, zip_path): # noqa: C901
18951895 try :
18961896 rename (tmpnam , real_path )
18971897
1898- except os . error :
1898+ except OSError :
18991899 if os .path .isfile (real_path ):
19001900 if self ._is_current (real_path , zip_path ):
19011901 # the file became current since it was checked above,
@@ -1908,7 +1908,7 @@ def _extract_resource(self, manager, zip_path): # noqa: C901
19081908 return real_path
19091909 raise
19101910
1911- except os . error :
1911+ except OSError :
19121912 # report a user-friendly error
19131913 manager .extraction_error ()
19141914
@@ -2901,7 +2901,7 @@ def __getattr__(self, attr):
29012901
29022902 def __dir__ (self ):
29032903 return list (
2904- set (super (Distribution , self ).__dir__ ())
2904+ set (super ().__dir__ ())
29052905 | set (attr for attr in self ._provider .__dir__ () if not attr .startswith ('_' ))
29062906 )
29072907
@@ -3168,7 +3168,7 @@ class RequirementParseError(packaging.requirements.InvalidRequirement):
31683168class Requirement (packaging .requirements .Requirement ):
31693169 def __init__ (self , requirement_string ):
31703170 """DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!"""
3171- super (Requirement , self ).__init__ (requirement_string )
3171+ super ().__init__ (requirement_string )
31723172 self .unsafe_name = self .name
31733173 project_name = safe_name (self .name )
31743174 self .project_name , self .key = project_name , project_name .lower ()
0 commit comments