def ignored(self, *paths: PathLike) -> List[str]:
        """Checks if paths are ignored via ``.gitignore``.

        This does so using the :manpage:`git-check-ignore(1)` method.

        :param paths:
            List of paths to check whether they are ignored or not.

        :return:
            Subset of those paths which are ignored
        """
        try:
            proc: str = self.git.check_ignore(*paths)
        except GitCommandError as err:
            if err.status == 1:
                # If return code is 1, this means none of the items in *paths are
                # ignored by Git, so return an empty list.
                return []
            else:
                # Raise the exception on all other return codes.
                raise

        return proc.replace("\\\\", "\\").replace('"', "").split("\n")
Checks if paths are ignored via ``.gitignore``.

        This does so using the :manpage:`git-check-ignore(1)` method.

        :param paths:
            List of paths to check whether they are ignored or not.

        :return:
            Subset of those paths which are ignored
        
git/repo/base.py