# Path: boussole/exceptions.py
# class FinderException(BoussoleBaseException):
#     """
#     Exception to be raised when error occurs with finder usage.
#     """
#     pass


import fnmatch
import os
from .exceptions import FinderException

        Args:
            filepath (str): A file path. Can be absolute, relative or just a
                filename.

        Returns:
            bool: True if file is a partial source, else False.
        """
        path, filename = os.path.split(filepath)
        return filename.startswith("_")

    def is_allowed(self, filepath, excludes=[]):
        """
        Check from exclude patterns if a relative filepath is allowed

        Args:
            filepath (str): A relative file path. (exclude patterns are
                allways based from the source directory).

        Keyword Arguments:
            excludes (list): A list of excluding (glob) patterns. If filepath
                matchs one of patterns, filepath is not allowed.

        Raises:
            boussole.exception.FinderException: If given filepath is absolute.

        Returns:
            str: Filepath with new extension.
        """
        if os.path.isabs(filepath):

# Path: boussole/exceptions.py
# class FinderException(BoussoleBaseException):
#     """
#     Exception to be raised when error occurs with finder usage.
#     """
#     pass


# Path: boussole/finder.py
import fnmatch
import os
from .exceptions import FinderException


        Args:
            filepath (str): A file path. Can be absolute, relative or just a
                filename.

        Returns:
            bool: True if file is a partial source, else False.
        """
        path, filename = os.path.split(filepath)
        return filename.startswith("_")

    def is_allowed(self, filepath, excludes=[]):
        """
        Check from exclude patterns if a relative filepath is allowed

        Args:
            filepath (str): A relative file path. (exclude patterns are
                allways based from the source directory).

        Keyword Arguments:
            excludes (list): A list of excluding (glob) patterns. If filepath
                matchs one of patterns, filepath is not allowed.

        Raises:
            boussole.exception.FinderException: If given filepath is absolute.

        Returns:
            str: Filepath with new extension.
        """
        if os.path.isabs(filepath):

            raise FinderException("'Finder.is_allowed()' only accept relative"