Skip to content

base_sanitizer

SanitizerInterface

Bases: ABC

Sanitizer for the Generator Input Parameters.

Source code in src/cookiecutter_python/backend/sanitization/string_sanitizers/base_sanitizer.py
 7
 8
 9
10
11
12
13
14
15
16
class SanitizerInterface(ABC):
    """Sanitizer for the Generator Input Parameters."""

    def __call__(self, data: t.Any) -> None:
        """Sanitize input data.

        Verifies that the input data have a valid value and/or format. Raises an
        exception, if the data do pass the check(s).
        """
        raise NotImplementedError

__call__(data)

Sanitize input data.

Verifies that the input data have a valid value and/or format. Raises an exception, if the data do pass the check(s).

Source code in src/cookiecutter_python/backend/sanitization/string_sanitizers/base_sanitizer.py
10
11
12
13
14
15
16
def __call__(self, data: t.Any) -> None:
    """Sanitize input data.

    Verifies that the input data have a valid value and/or format. Raises an
    exception, if the data do pass the check(s).
    """
    raise NotImplementedError