Skip to content

Conversation

@allenap
Copy link
Contributor

@allenap allenap commented Jul 22, 2025

This adds a TypeVar to useFixture such that, in the code below, type checkers (e.g. pyright) see the type of my_fixture as MyFixture:

my_fixture = self.useFixture(MyFixture())

@jelmer jelmer self-assigned this Jul 22, 2025
@jelmer jelmer merged commit 6b46551 into testing-cabal:master Jul 22, 2025
7 checks passed
@allenap allenap deleted the preserve-type-when-using-fixture branch July 22, 2025 11:09
@allenap
Copy link
Contributor Author

allenap commented Jul 22, 2025

Thanks @jelmer!

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

Successfully merging this pull request may close these issues.

2 participants