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

Fix type query for recursive aliases #14136

Merged
merged 2 commits into from
Nov 19, 2022

Conversation

ilevkivskyi
Copy link
Member

@ilevkivskyi ilevkivskyi commented Nov 18, 2022

See #14130 for context.

Btw it looks like these Any reports are quite broken in general. Some issues I found:

  • Many types are reported twice (even non-recursive)
  • Explicit Any in alias r.h.s are not counted (because of reckless res = make_any_non_explicit(res) in semanal.py)
  • For generic aliases we count their r.h.s. as containing Any from omitted generics

I tried to fix these things, but it is not trivial, so maybe we can do it later in a separate PR.

@github-actions
Copy link
Contributor

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

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Nice, looks like CollectAllInnerTypesQuery was the only query that overrode query_types

@hauntsaninja hauntsaninja merged commit 6cd8e00 into python:master Nov 19, 2022
@ilevkivskyi ilevkivskyi deleted the fix-rec-report branch November 19, 2022 08:31
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