def _determine_local_import_names(start_dir):
 file_ext_pairs = [os.path.splitext(path) for path in os.listdir(start_dir)]
 return [basename for (basename, extension) in file_ext_pairs if ((extension == '.py') or (os.path.isdir(os.path.join(start_dir, basename)) and (basename not in '__pycache__')))]

def _determine_local_import_names ( start_dir ) : file_ext_pairs = [ os . path . splitext ( path ) for path in os . listdir ( start_dir ) ] return [ basename for ( basename , extension ) in file_ext_pairs if ( ( extension == '.py' ) or ( os . path . isdir ( os . path . join ( start_dir , basename ) ) and ( basename not in '__pycache__' ) ) ) ]
determines all import names that should be considered "local" .