← Back to issue list

lint: fix ruff warnings SIM108, SIM112, SIM117, TRY300

View original Github issue

Metadata

Project
craft-providers
Number
#303
Type
pull request
State
merged
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

Merged #303, applying Ruff fixes for SIM108, SIM112, SIM117, and TRY300 across five files; changes landed in commit 2d082e2.

Resolution: closed resolved

Reason: PR #303 was approved and merged, resolving the four Ruff warnings across five files. The resulting main-branch commit is 2d082e2.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? ----- Resolves: - `SIM108`: Use ternary operator instead of `if`-`else`-block - `SIM112`: Use capitalized environment variable `HTTPS_PROXY` instead of `https_proxy` - `SIM117`: Use a single `with` statement with multiple contexts instead of nested `with` statements - `TRY300`: Consider moving this statement to an `else` block

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged #303, applying Ruff fixes for SIM108, SIM112, SIM117, and TRY300 across five files; changes landed in commit 2d082e2.
stealth/space-bunny-alpha — closed resolved Merged into main as commit 2d082e2 ("lint: fix ruff warnings SIM108, SIM112, TRY300 (#303)"), a pure style cleanup resolving SIM108, SIM112, SIM117 and TRY300 across 5 files (+9/-12).
qwen/qwen3.6-35b-a3b — closed resolved Merged linting fix addressing ruff warnings SIM108, SIM112, SIM117, and TRY300 across 5 files.

Update history

Date Change
created

Related issues

Issue Project State Summary Similarity
#302 lint: fix ruff warnings SIM102 and SIM114 craft-providers merged Merged PR #302, resolving Ruff SIM102 and SIM114 warnings by simplifying conditional branches (commit 427870d).
90%
#33 lint: fix lint issues with newer ruff craft-archives merged PR #33 merged as commit c2a6687, fixing new lint failures introduced by a newer Ruff release across3 files (+5/-3). Maintainer deferred extra unit tests to CRAFT-1641.
76%
#301 lint: fix ruff warning PLC1901 craft-providers merged Merged PR #301 (commit d547a8f) by maintainer mr-cal replaced `string == ""` checks with `not string` in 4 files (+4/-5), clearing ruff PLC1901 lint warnings.
76%
#1465 style: fix linting issues for newer ruff craft-parts merged Merged #1465 as a58695ef, fixing five files (+13/-6) for compatibility with newer Ruff; all CI checks passed.
76%
#68 lint: update ruff and fix linting craft-archives merged Merged PR #68 as commit 8bb81ae, updating Ruff and fixing lint violations across four files after prerequisite #67.
76%
#90 lint: ignore ruff SIM117 starbase merged Merged PR #90 (commit f3c4f88) added ruff SIM117 to the ignore list in pyproject.toml, since combining nested with-statements reduced readability at 88-char line lengths.
76%
#803 style: fix linting issues with ruff 0.12 craft-application merged Merged via commit 5e15ff09, fixing Ruff 0.12 lint failures across 14 files. A separate integration-test failure was fixed by #804.
74%
#1737 style: fix linting for ruff 0.5 charmcraft merged Merged PR #1737 as commit 8994523e, updating one file (+2/-6) to fix linting under Ruff 0.5.
73%
#1323 style: fix new ruff warnings rockcraft merged PR #1323 merged to main: hand-fixed minor new Ruff warnings in 3 files (+30/-20). Lint and all test suites passed; only source-spread-tests failed (unrelated to style change).
73%
#55 lint: stricter ruff rules starbase merged Merged PR canonical/starbase#55 as b5cda0d, tightening Ruff lint rules in one file (+23/-9) after maintainer approval.
73%