@@ -69,7 +69,7 @@ def _r_long(int_bytes):
6969def _path_join (* args ):
7070 """Replacement for os.path.join."""
7171 return path_sep .join (x [:- len (path_sep )] if x .endswith (path_sep ) else x
72- for x in args if x )
72+ for x in args if x )
7373
7474
7575def _path_exists (path ):
@@ -406,14 +406,16 @@ def _bytes_from_bytecode(self, fullname, data, source_stats):
406406 pass
407407 else :
408408 if _r_long (raw_timestamp ) != source_mtime :
409- raise ImportError ("bytecode is stale for {}" .format (fullname ))
409+ raise ImportError (
410+ "bytecode is stale for {}" .format (fullname ))
410411 try :
411412 source_size = source_stats ['size' ] & 0xFFFFFFFF
412413 except KeyError :
413414 pass
414415 else :
415416 if _r_long (raw_size ) != source_size :
416- raise ImportError ("bytecode is stale for {}" .format (fullname ))
417+ raise ImportError (
418+ "bytecode is stale for {}" .format (fullname ))
417419 # Can't return the code object as errors from marshal loading need to
418420 # propagate even when source is available.
419421 return data [12 :]
@@ -519,7 +521,7 @@ def get_code(self, fullname):
519521 code_object = compile (source_bytes , source_path , 'exec' ,
520522 dont_inherit = True )
521523 if (not sys .dont_write_bytecode and bytecode_path is not None and
522- source_mtime is not None ):
524+ source_mtime is not None ):
523525 # If e.g. Jython ever implements imp.cache_from_source to have
524526 # their own cached file format, this block of code will most likely
525527 # throw an exception.
@@ -890,7 +892,7 @@ def __exit__(self, exc_type, exc_value, exc_traceback):
890892
891893def _resolve_name (name , package , level ):
892894 """Resolve a relative module name to an absolute one."""
893- bits = package .rsplit ('.' , level - 1 )
895+ bits = package .rsplit ('.' , level - 1 )
894896 if len (bits ) < level :
895897 raise ValueError ('attempted relative import beyond top-level package' )
896898 base = bits [0 ]
@@ -1010,7 +1012,7 @@ def _handle_fromlist(module, fromlist, import_):
10101012 fromlist = list (fromlist )
10111013 fromlist .remove ('*' )
10121014 fromlist .extend (module .__all__ )
1013- for x in (y for y in fromlist if not hasattr (module ,y )):
1015+ for x in (y for y in fromlist if not hasattr (module , y )):
10141016 try :
10151017 import_ ('{0}.{1}' .format (module .__name__ , x ))
10161018 except ImportError :
0 commit comments