Skip to content

[red-knot] Add narrowing for 'while' loops#14947

Merged
sharkdp merged 1 commit intomainfrom
david/while-loop-narrowing
Dec 13, 2024
Merged

[red-knot] Add narrowing for 'while' loops#14947
sharkdp merged 1 commit intomainfrom
david/while-loop-narrowing

Conversation

@sharkdp
Copy link
Contributor

@sharkdp sharkdp commented Dec 12, 2024

Summary

Add type narrowing for while loops and corresponding else branches.

closes #14861

Test Plan

New Markdown tests.

@sharkdp sharkdp added the ty Multi-file analysis & type inference label Dec 12, 2024
@github-actions
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@sharkdp sharkdp marked this pull request as ready for review December 12, 2024 22:16
@sharkdp sharkdp merged commit d7ce548 into main Dec 13, 2024
@sharkdp sharkdp deleted the david/while-loop-narrowing branch December 13, 2024 06:40
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

ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[red-knot] Narrowing for while loops

3 participants