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

Fixed bugs in two of the conformance tests: "generics_basic" and "generics_upper_bound". #1720

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

erictraut
Copy link
Collaborator

@erictraut erictraut commented Apr 17, 2024

These tests attempted to validate that type checkers enforced the rule that constraints and upper bounds within a TypeVar definition cannot be parameterized by other type variables (i.e. cannot be generic). The way the tests were written, they weren't actually testing this check. This allowed mypy and pyre (which both fail to catch this condition) to pass the tests. I've updated the test so it properly tests this condition.

…erics_upper_bound".

These tests attempted to validate that type checkers enforced the rule that constraints and upper bounds within a TypedDict definition cannot be parameterized by other type variables (i.e. cannot be generic). The way the tests were written, they weren't actually testing this check. This allowed mypy and pyre (which both fail to catch this condition) to pass the tests. I've updated the test so it properly tests this condition.
@erictraut erictraut changed the title Fixed bugs in two of the conformance tests: "generics_basic" and "gen… Fixed bugs in two of the conformance tests: "generics_basic" and "generics_upper_bound". Apr 17, 2024
@erictraut erictraut merged commit 226b528 into python:main Apr 17, 2024
5 checks passed
@erictraut erictraut deleted the generic_constraint_bounds branch April 17, 2024 16:24
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.

None yet

1 participant