code: def isignored(self, relpath, directory=False):
      
      relpath = self._relpath_no_dot(relpath)
      if directory:
        relpath = self._append_trailing_slash(relpath)
      return self.ignore.match_file(relpath)
docs: Returns True if path matches pants ignore pattern.