Skip to content

Add type hints, to account for different call variants #22

@last-partizan

Description

@last-partizan

I'm using pytest-cases, and using @fixture without parenthesis, and it produces errors in pyright.

@fixture
def some_fixture():
    ...
Argument of type "() -> str" cannot be assigned to parameter "scope" of type "str" in function "fixture"

There is @overload in typing to handle such cases
https://mypy.readthedocs.io/en/stable/generics.html#decorator-factories

Are you interested in adding support for type hinting?

Progress:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions