Skip to content

feat: support passing watchfiles.BaseFilter instance #437

Open
@monosans

Description

I think the user should be able to create their own reload filter and pass it this way. The current way of customizing reload filters is very limited, while this way removes all limitations.

import watchfiles
from granian import Granian

reload_filter_instance = watchfiles.PythonFilter(extra_extensions=(".html",))
# Let's call it reload_filter_instance to avoid making breaking changes
Granian(..., reload_filter_instance=reload_filter_instance).serve()

I am willing to submit a PR if you approve this change.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions