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

[red-knot] Support typing.TYPE_CHECKING #14952

Merged
merged 1 commit into from
Dec 13, 2024
Merged

Conversation

sharkdp
Copy link
Contributor

@sharkdp sharkdp commented Dec 13, 2024

Summary

Add support for typing.TYPE_CHECKING and typing_extensions.TYPE_CHECKING.

relates to: #14170

Test Plan

New Markdown-based tests

@sharkdp sharkdp added the red-knot Multi-file analysis & type inference label Dec 13, 2024
Copy link
Contributor

github-actions bot commented Dec 13, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@sharkdp sharkdp force-pushed the david/typing-type_checking branch 2 times, most recently from 1bbcc82 to 20e7775 Compare December 13, 2024 09:08
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.

Nice

crates/red_knot_python_semantic/src/types.rs Outdated Show resolved Hide resolved
@sharkdp sharkdp force-pushed the david/typing-type_checking branch from 20e7775 to a115741 Compare December 13, 2024 09:19
@sharkdp sharkdp enabled auto-merge (squash) December 13, 2024 09:21
@sharkdp sharkdp merged commit e96b13c into main Dec 13, 2024
20 checks passed
@sharkdp sharkdp deleted the david/typing-type_checking branch December 13, 2024 09:24
dcreager added a commit that referenced this pull request Dec 13, 2024
* main:
  [red-knot] Display definition range in trace logs (#14955)
  [red-knot] Move the `ClassBase` enum to its own submodule (#14957)
  [red-knot] mdtest: python version requirements (#14954)
  [airflow]: Import modules that has been moved to airflow providers (AIR303) (#14764)
  [red-knot] Support `typing.TYPE_CHECKING` (#14952)
  Add tracing support to mdtest (#14935)
  Re-enable the fuzzer job on PRs (#14953)
  [red-knot] Improve `match` mdtests (#14951)
  Rename `custom-typeshed-dir`, `target-version` and `current-directory` CLI options (#14930)
  [red-knot] Add narrowing for 'while' loops (#14947)
  [`ruff`]  Skip SQLModel base classes for `mutable-class-default` (`RUF012`) (#14949)
  [red-knot] Tests for 'while' loop boundness (#14944)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
red-knot Multi-file analysis & type inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants