Skip to content

ExtendedFilter

faststream.cli.supervisors.watchfiles.ExtendedFilter #

ExtendedFilter(*, ignore_paths: Optional[Sequence[Union[str, Path]]] = None, extra_extensions: Sequence[str] = ())

Bases: PythonFilter

A class that extends the watchfiles.PythonFilter class.

Initialize the class.

PARAMETER DESCRIPTION
ignore_paths

Optional sequence of paths to ignore.

TYPE: Optional[Sequence[Union[str, Path]]] DEFAULT: None

extra_extensions

Sequence of extra extensions to include.

TYPE: Sequence[str] DEFAULT: ()

RETURNS DESCRIPTION
None

None

Source code in faststream/cli/supervisors/watchfiles.py
def __init__(
    self,
    *,
    ignore_paths: Optional[Sequence[Union[str, Path]]] = None,
    extra_extensions: Sequence[str] = (),
) -> None:
    """Initialize the class.

    Args:
        ignore_paths: Optional sequence of paths to ignore.
        extra_extensions: Sequence of extra extensions to include.

    Returns:
        None

    """
    super().__init__(ignore_paths=ignore_paths, extra_extensions=extra_extensions)
    self.ignore_dirs = (
        *self.ignore_dirs,
        "venv",
        "env",
        ".github",
        ".mypy_cache",
        ".pytest_cache",
        ".ruff_cache",
        "__pycache__",
    )

ignore_dirs instance-attribute #

ignore_dirs: Tuple[str, ...] = (*ignore_dirs, 'venv', 'env', '.github', '.mypy_cache', '.pytest_cache', '.ruff_cache', '__pycache__')