Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
exhuma opened this issue Jun 14, 2023 · 1 comment
Open

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

exhuma opened this issue Jun 14, 2023 · 1 comment

Comments

@exhuma
Copy link

exhuma commented Jun 14, 2023

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:
@kuwv
Copy link
Contributor

kuwv commented Jul 10, 2023

#956

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants