Skip to content

[red-knot] Tests for 'while' loop boundness#14944

Merged
sharkdp merged 1 commit intomainfrom
david/while-loop-boundness
Dec 12, 2024
Merged

[red-knot] Tests for 'while' loop boundness#14944
sharkdp merged 1 commit intomainfrom
david/while-loop-boundness

Conversation

@sharkdp
Copy link
Contributor

@sharkdp sharkdp commented Dec 12, 2024

Summary

Regression test(s) for something that broken while implementing #14759. We have similar tests for other control flow elements, but feel free to let me know if this seems superfluous.

Test Plan

New mdtests

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

@carljm carljm left a comment

Choose a reason for hiding this comment

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

Definitely useful to have these, thank you!

@github-actions
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+0 -2 violations, +16 -0 fixes in 2 projects; 53 projects unchanged)

pandas-dev/pandas (+0 -2 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

- pandas/core/groupby/groupby.py:4082:39: PYI061 `Literal[None, ...]` can be replaced with `Literal[...] | None`
- pandas/core/groupby/indexing.py:299:39: PYI061 `Literal[None, ...]` can be replaced with `Literal[...] | None`

zulip/zulip (+0 -0 violations, +16 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL

+ corporate/views/billing_page.py:326:24: PYI061 [*] `Literal[None, ...]` can be replaced with `Literal[...] | None`
- corporate/views/billing_page.py:326:24: PYI061 `Literal[None, ...]` can be replaced with `Literal[...] | None`
+ corporate/views/remote_billing_page.py:158:26: PYI061 [*] `Literal[None, ...]` can be replaced with `Literal[...] | None`
- corporate/views/remote_billing_page.py:158:26: PYI061 `Literal[None, ...]` can be replaced with `Literal[...] | None`
+ corporate/views/remote_billing_page.py:159:42: PYI061 [*] `Literal[None, ...]` can be replaced with `Literal[...] | None`
- corporate/views/remote_billing_page.py:159:42: PYI061 `Literal[None, ...]` can be replaced with `Literal[...] | None`
+ corporate/views/remote_billing_page.py:160:48: PYI061 [*] `Literal[None, ...]` can be replaced with `Literal[...] | None`
- corporate/views/remote_billing_page.py:160:48: PYI061 `Literal[None, ...]` can be replaced with `Literal[...] | None`
+ corporate/views/remote_billing_page.py:678:26: PYI061 [*] `Literal[None, ...]` can be replaced with `Literal[...] | None`
- corporate/views/remote_billing_page.py:678:26: PYI061 `Literal[None, ...]` can be replaced with `Literal[...] | None`
+ corporate/views/remote_billing_page.py:679:42: PYI061 [*] `Literal[None, ...]` can be replaced with `Literal[...] | None`
- corporate/views/remote_billing_page.py:679:42: PYI061 `Literal[None, ...]` can be replaced with `Literal[...] | None`
+ corporate/views/remote_billing_page.py:680:48: PYI061 [*] `Literal[None, ...]` can be replaced with `Literal[...] | None`
- corporate/views/remote_billing_page.py:680:48: PYI061 `Literal[None, ...]` can be replaced with `Literal[...] | None`
+ corporate/views/remote_billing_page.py:70:5: PYI061 [*] `Literal[None, ...]` can be replaced with `Literal[...] | None`
- corporate/views/remote_billing_page.py:70:5: PYI061 `Literal[None, ...]` can be replaced with `Literal[...] | None`

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
PYI061 18 0 2 16 0

@sharkdp sharkdp merged commit 657d26f into main Dec 12, 2024
@sharkdp sharkdp deleted the david/while-loop-boundness branch December 12, 2024 20:06
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.

3 participants