Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Mark sys.version_info[0] < 3 and similar comparisons as outdated #13175

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

charliermarsh
Copy link
Member

Summary

Closes #12993.

@charliermarsh charliermarsh added the rule Implementing or modifying a lint rule label Aug 30, 2024
checker.diagnostics.push(diagnostic);
let reason = match (int.as_u8(), op) {
(Some(2), CmpOp::Eq) => Reason::AlwaysFalse,
(Some(3), CmpOp::Eq) => Reason::AlwaysTrue,
Copy link
Member Author

Choose a reason for hiding this comment

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

== 3 is maybe a little dubious, but we were already doing it. (== is the only case we handled before.)

Copy link

codspeed-hq bot commented Aug 30, 2024

CodSpeed Performance Report

Merging #13175 will degrade performances by 7.61%

Comparing charlie/sys (b813d91) with main (28ab5f4)

Summary

❌ 1 regressions
✅ 31 untouched benchmarks

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

Benchmarks breakdown

Benchmark main charlie/sys Change
linter/all-rules[numpy/globals.py] 726.4 µs 786.3 µs -7.61%

Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@charliermarsh charliermarsh merged commit ee21fc7 into main Aug 30, 2024
19 of 20 checks passed
@charliermarsh charliermarsh deleted the charlie/sys branch August 30, 2024 23:38
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UP036 should identify sys.version_info[0] or other parts
1 participant