code: def excluded(self, filename, parent=None):
          
          if not self.options.exclude:
              return False
          basename = os.path.basename(filename)
          if filename_match(basename, self.options.exclude):
              return True
          if parent:
              filename = os.path.join(parent, filename)
          filename = os.path.abspath(filename)
          return filename_match(filename, self.options.exclude)
docs: Check if the file should be excluded.
  
          Check if 'options.exclude' contains a pattern that matches filename.