Skip to content

feature: support generators as providers #38

Description

@tlambert03

we should support generator_functions as providers, so they can perform setup/cleanup before provision

def provide_something() -> Iterator[Something]:
    try:
        yield Something()
    finally:
        ...  # cleanup

Metadata

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