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 assert_type failures when some nodes are deferred #15920

Merged
merged 2 commits into from
Aug 21, 2023
Merged

Conversation

sobolevn
Copy link
Member

Now it is quite the same as reveal_type. Which is defined here:

if not self.chk.current_node_deferred:

Closes #15851

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

This LGTM! One minor suggestion to make the variable names in the test make a little more sense:

test-data/unit/check-expressions.test Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

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

spack (https://github.com/spack/spack): typechecking got 1.29x slower (52.6s -> 67.7s)
(Performance measurements are based on a single noisy sample)

@sobolevn sobolevn merged commit e804e8d into master Aug 21, 2023
@sobolevn sobolevn deleted the issue-15851 branch August 21, 2023 12:32
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.

false positive: functools.lru_cache() breaks assert_type(..., SomeEnum)
2 participants