Skip to content

is_subtype is not separate from is_compatible_with #2038

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

Closed
ddfisher opened this issue Aug 18, 2016 · 2 comments
Closed

is_subtype is not separate from is_compatible_with #2038

ddfisher opened this issue Aug 18, 2016 · 2 comments
Labels
bug mypy got something wrong priority-1-normal

Comments

@ddfisher
Copy link
Collaborator

We currently do not distinguish subtype relations from compatibility relations. This causes problems like #2031. We should separate out subtyping from compatibility checks.

@ddfisher ddfisher added the refactoring Changing mypy's internals label Aug 18, 2016
@ddfisher ddfisher added this to the 0.5 milestone Aug 18, 2016
@JukkaL
Copy link
Collaborator

JukkaL commented Sep 30, 2016

There is is_proper_subtype which was intended as a real subtype check, but it's only partially implemented and it's apparently not used anywhere any more.

I'd recommend calling the function is_compatible instead of is_compatible_with, to be consistent with the current naming convention (for example, we have is_subtype instead of is_subtype_of or similar).

@JukkaL
Copy link
Collaborator

JukkaL commented May 2, 2017

is_proper_subtype is now a separate thing and used in various places, including in union simplification checks, so I'm closing this issue. If there are remaining issues we can create separate issues and refer to this as needed.

@JukkaL JukkaL closed this as completed May 2, 2017
@JukkaL JukkaL added bug mypy got something wrong and removed refactoring Changing mypy's internals labels May 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong priority-1-normal
Projects
None yet
Development

No branches or pull requests

3 participants