def should_skip_file(name):
 if name.startswith('.'):
  return 'Skipping hidden file %(filename)s'
 if name.endswith(('~', '.bak')):
  return 'Skipping backup file %(filename)s'
 if name.endswith(('.pyc', '.pyo')):
  return (('Skipping %s file ' % os.path.splitext(name)[1]) + '%(filename)s')
 if name.endswith('$py.class'):
  return 'Skipping $py.class file %(filename)s'
 if (name in ('CVS', '_darcs')):
  return 'Skipping version control directory %(filename)s'
 return None

def should_skip_file ( name ) : if name . startswith ( '.' ) : return 'Skipping hidden file %(filename)s' if name . endswith ( ( '~' , '.bak' ) ) : return 'Skipping backup file %(filename)s' if name . endswith ( ( '.pyc' , '.pyo' ) ) : return ( ( 'Skipping %s file ' % os . path . splitext ( name ) [ 1 ] ) + '%(filename)s' ) if name . endswith ( '$py.class' ) : return 'Skipping $py.class file %(filename)s' if ( name in ( 'CVS' , '_darcs' ) ) : return 'Skipping version control directory %(filename)s' return None
checks if a file should be skipped based on its name .