Skip to content

fix inspect.isclass does not make a TypeForm valid for isinstance #4822 - #4830

Open
asukaminato0721 wants to merge 1 commit into
facebook:mainfrom
asukaminato0721:4822
Open

asukaminato0721 wants to merge 1 commit into
facebook:mainfrom
asukaminato0721:4822

Conversation

@asukaminato0721

Copy link
Copy Markdown
Collaborator

Summary

Fixes #4822

TypeForm values narrowed by inspect.isclass now work with isinstance.

Test Plan

add test

@meta-codesync

meta-codesync Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

This pull request has been imported. If you are a Meta employee, you can view this in D119017345. (Because this pull request was imported automatically, there will not be any future comments.)

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

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

============================================================
SUMMARY
============================================================
Total: +0 new errors, -1 fixed errors
By preset: +0/-1 (default), +0/-1 (strict)

Projects with changes (1):
  streamlit: +0 -1
============================================================

FULL DIFF DETAILS
------------------------------------------------------------

streamlit (https://github.com/streamlit/streamlit)
- ERROR lib/streamlit/elements/lib/options_selector_utils.py:168:36-49: Expected class object, got `EnumMeta & type[E2]` [invalid-argument]

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity for more than 2 weeks.

If you are still working on this this pull request, please add a comment or push new commits to keep it active. Otherwise, please unassign yourself and allow someone else to take over.

Thank you for your contributions!

@github-actions github-actions Bot added the stale label Sep 22, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

inspect.isclass does not make a TypeForm valid for isinstance

2 participants