Skip to content

stubgen: Use _typeshed.Incomplete instead of typing.Any #12449

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

Merged
merged 1 commit into from
Mar 25, 2022

Conversation

srittau
Copy link
Contributor

@srittau srittau commented Mar 25, 2022

Since python/typeshed#7535, typeshed has a new type _typeshed.Incomplete,
intended to mark fields that are partly annotated, but need more manual
investigation. This applies to all types generated by stubgen, except
when explicitly annotated with Any in the implementation.

Test Plan

I changed all stubgen tests to use Incomplete instead of Any, except testExplicitAnyArg and testExplicitReturnedAny that checked explicit Any annotations. These tests were kept as is.

Since python/typeshed#7535, typeshed has a new type `_typeshed.Incomplete`,
intended to mark fields that are partly annotated, but need more manual
investigation. This applies to all types generated by stubgen, except
when explicitly annotated with `Any` in the implementation.
@github-actions

This comment has been minimized.

@srittau
Copy link
Contributor Author

srittau commented Mar 25, 2022

I'm not sure why the primer run failed.

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I restarted the mypy-primer run, but it doesn't matter too much since I'm pretty sure this won't affect typechecker output.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@JelleZijlstra JelleZijlstra merged commit 82bc8df into python:master Mar 25, 2022
@srittau srittau deleted the stubgen-incomplete branch May 16, 2025 14:08
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