Skip to content

[Bug fix] Fix rule B909's panic when checking large loop blocks#11772

Merged
MichaReiser merged 1 commit intoastral-sh:mainfrom
Embers-of-the-Fire:main
Jun 6, 2024
Merged

[Bug fix] Fix rule B909's panic when checking large loop blocks#11772
MichaReiser merged 1 commit intoastral-sh:mainfrom
Embers-of-the-Fire:main

Conversation

@Embers-of-the-Fire
Copy link
Contributor

@Embers-of-the-Fire Embers-of-the-Fire commented Jun 6, 2024

Summary

This pr should close #11771 by changing LoopMutationsVisitor::<field>branch from u8 to u32.

Test Plan

Tested using the example programme mentioned in the related issue.

@codspeed-hq
Copy link

codspeed-hq bot commented Jun 6, 2024

CodSpeed Performance Report

Merging #11772 will improve performances by 4.67%

Comparing Embers-of-the-Fire:main (06e69e0) with main (6c1fa1d)

Summary

⚡ 1 improvements
✅ 29 untouched benchmarks

Benchmarks breakdown

Benchmark main Embers-of-the-Fire:main Change
linter/all-with-preview-rules[numpy/globals.py] 839.1 µs 801.7 µs +4.67%

@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@MichaReiser
Copy link
Member

Thanks

@MichaReiser MichaReiser merged commit f144ede into astral-sh:main Jun 6, 2024
@dhruvmanila dhruvmanila added the bug Something isn't working label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rule B909 cause panic

3 participants