Skip to content

Conversation

@ntBre
Copy link
Contributor

@ntBre ntBre commented Mar 11, 2025

Summary

Stabilizes RUF041. The tests are already in the right place, and the docs look good.

Test Plan

0 issues, 1 PR fixing nested literals and unions the day after the rule was added. No changes since then

I wonder if the fix in that PR could be relevant for #16639, where I noticed a potential issue with Union. It could be unrelated, though.

Summary
--

Stabilizes RUF041. The tests are already in the right place, and the docs look
good.

Test Plan
--

0 issues, 1 [PR] fixing nested literals and unions the day after the rule was
added. No changes since then

I wonder if the fix in that PR could be relevant for
#16639, where I noticed a potential issue
with `Union`. It could be unrelated, though.

[PR]: #14641
@ntBre ntBre added the rule Implementing or modifying a lint rule label Mar 11, 2025
@ntBre ntBre added this to the v0.10 milestone Mar 11, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Mar 11, 2025

CodSpeed Performance Report

Merging #16648 will degrade performances by 4.6%

Comparing brent/ruf041-0.10 (4ddef74) with micha/ruff-0.10 (7bc8bb2)

Summary

❌ 1 regressions
✅ 31 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
red_knot_check_file[incremental] 5.2 ms 5.5 ms -4.6%

@github-actions
Copy link
Contributor

github-actions bot commented Mar 11, 2025

ruff-ecosystem results

Linter (stable)

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

DisnakeDev/disnake (+2 -0 violations, +0 -0 fixes)

+ tests/test_utils.py:747:18: RUF041 [*] Unnecessary nested `Literal`
+ tests/test_utils.py:775:10: RUF041 [*] Unnecessary nested `Literal`

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
RUF041 2 2 0 0 0

Linter (preview)

✅ ecosystem check detected no linter changes.

@ntBre
Copy link
Contributor Author

ntBre commented Mar 11, 2025

These look like true positives to me. Interestingly, it looks like disnake is testing this flattening behavior, so they will probably want to noqa or otherwise disable this rule, though.

@ntBre ntBre mentioned this pull request Mar 12, 2025
2 tasks
@ntBre ntBre merged commit 29a2779 into micha/ruff-0.10 Mar 12, 2025
20 of 21 checks passed
@ntBre ntBre deleted the brent/ruf041-0.10 branch March 12, 2025 18:12
MichaReiser pushed a commit that referenced this pull request Mar 13, 2025
Summary
--

Stabilizes RUF041. The tests are already in the right place, and the
docs look good.

Test Plan
--

0 issues, 1 [PR] fixing nested literals and unions the day after the
rule was added. No changes since then

I wonder if the fix in that PR could be relevant for
#16639, where I noticed a
potential issue with `Union`. It could be unrelated, though.

[PR]: #14641
MichaReiser pushed a commit that referenced this pull request Mar 13, 2025
Summary
--

Stabilizes RUF041. The tests are already in the right place, and the
docs look good.

Test Plan
--

0 issues, 1 [PR] fixing nested literals and unions the day after the
rule was added. No changes since then

I wonder if the fix in that PR could be relevant for
#16639, where I noticed a
potential issue with `Union`. It could be unrelated, though.

[PR]: #14641
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.

3 participants