parameters: (filename, exclude)
return_statement: return True
docstring: Return True if file is okay for modifying/recursing.
docstring_summary: Return True if file is okay for modifying/recursing.
docstring_tokens: Return True if file is okay for modifying / recursing .
function: def match_file(filename, exclude):
      """Return True if file is okay for modifying/recursing."""
      base_name = os.path.basename(filename)
  
      if base_name.startswith('.'):
          return False
  
      for pattern in exclude:
          if fnmatch.fnmatch(base_name, pattern):
              return False
          if fnmatch.fnmatch(filename, pattern):
              return False
  
      if not os.path.isdir(filename) and not is_python_file(filename):
          return False
  
      return True
function_tokens: def match_file ( filename , exclude ) : base_name = os . path . basename ( filename ) if base_name . startswith ( '.' ) : return False for pattern in exclude : if fnmatch . fnmatch ( base_name , pattern ) : return False if fnmatch . fnmatch ( filename , pattern ) : return False if not os . path . isdir ( filename ) and not is_python_file ( filename ) : return False return True