10000 Stabilize `unnecessary-dict-index-lookup` (`PLR1733`) by dylwil3 · Pull Request #18571 · astral-sh/ruff · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Stabilize unnecessary-dict-index-lookup (PLR1733) #18571

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

Merged
merged 2 commits into from
Jun 12, 2025

Conversation

dylwil3
Copy link
Collaborator
@dylwil3 dylwil3 commented Jun 8, 2025

No description provided.

@dylwil3 dylwil3 added this to the v0.12 milestone Jun 8, 2025
@dylwil3 dylwil3 added the rule Implementing or modifying a lint rule label Jun 8, 2025
Copy link
Contributor
github-actions bot commented Jun 8, 2025

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+19 -0 violations, +0 -0 fixes in 3 projects; 52 projects unchanged)

apache/airflow (+2 -0 violations, +0 -0 fixes)

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

+ providers/amazon/src/airflow/providers/amazon/aws/executors/ecs/utils.py:271:31: PLR1733 [*] Unnecessary lookup of dictionary value by key
+ providers/amazon/src/airflow/providers/amazon/aws/hooks/glue.py:407:88: PLR1733 [*] Unnecessary lookup of dictionary value by key

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

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

+ analytics/views/stats.py:622:51: PLR1733 [*] Unnecessary lookup of dictionary value by key
+ analytics/views/stats.py:624:44: PLR1733 [*] Unnecessary lookup of dictionary value by key
+ zerver/lib/subscription_info.py:838:52: PLR1733 [*] Unnecessary lookup of dictionary value by key

astropy/astropy (+14 -0 violations, +0 -0 fixes)

+ astropy/utils/metadata/merge.py:269:40: PLR1733 [*] Unnecessary lookup of dictionary value by key
+ astropy/utils/metadata/merge.py:271:28: PLR1733 [*] Unnecessary lookup of dictionary value by key
+ astropy/utils/metadata/merge.py:281:29: PLR1733 [*] Unnecessary lookup of dictionary value by key
+ astropy/utils/metadata/merge.py:283:67: PLR1733 [*] Unnecessary lookup of dictionary value by key
+ astropy/utils/metadata/merge.py:288:54: PLR1733 [*] Unnecessary lookup of dictionary value by key
+ astropy/utils/metadata/merge.py:299:32: PLR1733 [*] Unnecessary lookup of dictionary value by key
+ astropy/utils/metadata/merge.py:300:22: PLR1733 [*] Unnecessary lookup of dictionary value by key
+ astropy/utils/metadata/merge.py:300:22: PLR1733 [*] Unnecessary lookup of dictionary value by key
+ astropy/utils/metadata/merge.py:302:44: PLR1733 [*] Unnecessary lookup of dictionary value by key
+ astropy/utils/metadata/merge.py:302:44: PLR1733 [*] Unnecessary lookup of dictionary value by key
+ astropy/utils/metadata/merge.py:305:59: PLR1733 [*] Unnecessary lookup of dictionary value by key
+ astropy/utils/metadata/merge.py:310:60: PLR1733 [*] Unnecessary lookup of dictionary value by key
+ astropy/utils/metadata/merge.py:317:32: PLR1733 [*] Unnecessary lookup of dictionary value by key
+ astropy/utils/metadata/merge.py:319:32: PLR1733 [*] Unnecessary lookup of dictionary value by key

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
PLR1733 19 19 0 0 0

Linter (preview)

✅ ecosystem check detected no linter changes.

@ntBre ntBre force-pushed the brent/release-0.12.0 branch from 0370d8a to 040fb6b Compare June 8, 2025 19:55
@ntBre ntBre requested a review from AlexWaygood as a code owner June 8, 2025 19:55
@ntBre ntBre force-pushed the brent/release-0.12.0 branch from 040fb6b to 9252447 Compare June 8, 2025 20:18
@AlexWaygood AlexWaygood removed their request for review June 8, 2025 20:26
@ntBre ntBre force-pushed the brent/release-0.12.0 branch from 9252447 to 829acf4 Compare June 9, 2025 00:22
@dylwil3 dylwil3 force-pushed the dylan/stabilize-plr1733 branch from f7bf03a to 761a2c0 Compare June 9, 2025 12:54
Copy link
Contributor
@ntBre ntBre left a comment

Choose a reason for hiding this comment

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

Docs, tests, and ecosystem LGTM!

@ntBre ntBre force-pushed the brent/release-0.12.0 branch 3 times, most recently from 3ad0f1f to ff6fb14 Compare June 11, 2025 11:09
@ntBre ntBre mentioned this pull request Jun 11, 2025
2 tasks
ntBre and others added 2 commits June 12, 2025 08:03
Summary
--

Release branch for Ruff 0.12.0

TODOs
--

- [ ] Drop empty first commit
- [ ] Merge with rebase-merge (**don't squash merge!!!!**)
@dylwil3 dylwil3 force-pushed the dylan/stabilize-plr1733 branch from 761a2c0 to 23c7b25 Compare June 12, 2025 13:04
@dylwil3 dylwil3 merged commit b723ebc into brent/release-0.12.0 Jun 12, 2025
34 checks passed
@dylwil3 dylwil3 deleted the dylan/stabilize-plr1733 branch June 12, 2025 13:18
ntBre added a commit that referenced this pull request Jun 12, 2025
Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
ntBre added a commit that referenced this pull request Jun 16, 2025
Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
ntBre added a commit that referenced this pull request Jun 17, 2025
Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
ntBre added a commit that referenced this pull request Jun 17, 2025
Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
carljm added a commit to MatthewMckee4/ruff that referenced this pull request Jun 17, 2025
…ence

* main: (71 commits)
  Bump 0.12.0 (astral-sh#18724)
  Revert "[ty] Offer "Did you mean...?" suggestions for unresolved `from` imports and unresolved attributes (astral-sh#18705)" (astral-sh#18721)
  [`flake8-return`] Stabilize only add `return None` at the end when fixing `implicit-return` (`RET503`) (astral-sh#18516)
  [`pyupgrade`] Stabilize `non-pep695-generic-function` (`UP047`) (astral-sh#18524)
  [`pyupgrade`] Stabilize `non-pep695-generic-class` (`UP046`) (astral-sh#18519)
  [`pandas-vet`] Deprecate `pandas-df-variable-name` (`PD901`) (astral-sh#18618)
  [`flake8-bandit`] Remove `suspicious-xmle-tree-usage` (`S320`) (astral-sh#18617)
  Stabilize `dataclass-enum` (`RUF049`) (astral-sh#18570)
  Stabilize `unnecessary-dict-index-lookup` (`PLR1733`) (astral-sh#18571)
  Remove rust-toolchain.toml from sdist (astral-sh#17925)
  Stabilize `starmap-zip` (`RUF058`) (astral-sh#18525)
  [`flake8-logging`] Stabilize `exc-info-outside-except-handler` (`LOG014`) (astral-sh#18517)
  [`pyupgrade`] Stabilize `non-pep604-annotation-optional` (`UP045`) and preview behavior for `non-pep604-annotation-union` (`UP007`) (astral-sh#18505)
  Stabilize `pytest-warns-too-broad` (`PT030`) (astral-sh#18568)
  Stabilize `for-loop-writes` (`FURB122`) (astral-sh#18565)
  Stabilize `pytest-warns-with-multiple-statements` (`PT031`) (astral-sh#18569)
  Stabilize `pytest-parameter-with-default-argument` (`PT028`) (astral-sh#18566)
  Stabilize `nan-comparison` (`PLW0177`) (astral-sh#18559)
  Stabilize `check-and-remove-from-set` (`FURB132`) (astral-sh#18560)
  Stabilize `unnecessary-round` (`RUF057`) (astral-sh#18563)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0