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 contrapositive pyright tests #211

Merged
merged 5 commits into from
Jan 23, 2022
Merged

Add contrapositive pyright tests #211

merged 5 commits into from
Jan 23, 2022

Conversation

rsokl
Copy link
Contributor

@rsokl rsokl commented Jan 23, 2022

We can now check that pyright sees particular invocations of our code as "erroneous". E.g., we can now verify that a line like

builds(1)

will be marked as an error by static type checkers. This is achieved by configuring pyright to raise whenever # type: ignore is used unnecessarily. Thus we can write

builds(1)  # type: ignore

that pyright then runs without issue thus indicates that it indeed did suppress an error on that line.

We also unpin pyright, specifying 1.1.213 as the new minimum version.

@rsokl rsokl added enhancement New feature or request test suite Changes to hydra-zen's test suite type-checking Involves hydra_zen.typing or pyright/mypy labels Jan 23, 2022
@rsokl rsokl merged commit 9bb94de into main Jan 23, 2022
@rsokl rsokl deleted the unpin-pyright branch January 23, 2022 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request test suite Changes to hydra-zen's test suite type-checking Involves hydra_zen.typing or pyright/mypy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant