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

test: add type hint test #758

Merged
merged 4 commits into from
Sep 5, 2024

Conversation

mschoettle
Copy link
Contributor

Follow-up to #754 and #757 to catch type hint errors in the future.

@mschoettle
Copy link
Contributor Author

@last-partizan The failing test is because a lot of type hints use the union operator | which is not supported on Python 3.9.

@last-partizan
Copy link
Collaborator

@mschoettle that's interesting. But those files are using from future import __annotations__, so it's working for type-checkers but not for runtime?

If you don't care about python 3.9, then add @pytest.mark.skip based on python version.

@mschoettle
Copy link
Contributor Author

@mschoettle that's interesting. But those files are using from future import annotations, so it's working for type-checkers but not for runtime?

If you don't care about python 3.9, then add @pytest.mark.skip based on python version.

Yes, it is odd. Good idea, I added @pytest.mark.skipif.

@last-partizan last-partizan merged commit 58894dc into deschler:master Sep 5, 2024
22 checks passed
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