Skip to content

Replace is_proper_subtype(...) with is_subtype(..., proper=True) #2

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
wants to merge 0 commits into from

Conversation

relsunkaev
Copy link
Owner

@relsunkaev relsunkaev commented May 22, 2022

Description

Closes python#3297

Absorbed is_proper_subtype into is_subtype to remove a lot of code duplication. Now, when invoked with proper=True, is_subtype performs a proper subtype check. It now also accepts all parameters that is_proper_subtype did.

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Ran the full test suite on python 3.6 through 3.10

@github-actions

This comment has been minimized.

@github-actions
Copy link

Diff from mypy_primer, showing the effect of this PR on open source code:

mypy (https://github.com/python/mypy)
+ mypy_self_check.ini:20: error: Error importing plugin "misc/proper_plugin.py": cannot import name 'is_proper_subtype' from 'mypy.subtypes' (/tmp/mypy_primer/new_mypy/venv/lib/python3.10/site-packages/mypy/subtypes.py)  [misc]

@relsunkaev relsunkaev closed this Jun 17, 2022
@relsunkaev relsunkaev force-pushed the refactor/3297-combine-subtype-checks branch from de90003 to 9d63fa5 Compare June 17, 2022 06:02
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.

is_subtype vs is_proper_subtype
1 participant