Skip to content

add_collection() is missing the ModuleType in the type-hints #950

@exhuma

Description

@exhuma

Since upgrading to 2.1.2 I'm getting a typing error when adding a module as collection.

The error originates from this line:

coll: "Collection",

It can be fixed by using

    def add_collection(
        self,
        coll: Union["Collection", ModuleType],     # <-- fix
        name: Optional[str] = None,
        default: Optional[bool] = None,
    ) -> None:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions