Skip to content

Fix assert_type failures when some nodes are deferred#15920

Merged
sobolevn merged 2 commits intomasterfrom
issue-15851
Aug 21, 2023
Merged

Fix assert_type failures when some nodes are deferred#15920
sobolevn merged 2 commits intomasterfrom
issue-15851

Conversation

@sobolevn
Copy link
Copy Markdown
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
Copy Markdown
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:

Comment thread test-data/unit/check-expressions.test Outdated
@github-actions
Copy link
Copy Markdown
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