← Back to issue list

lint: fix ruff warning PLC1901

View original Github issue

Metadata

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

Current evaluation

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.

Resolution: closed resolved

Reason: The pull request itself was merged into the main branch as commit d547a8f ("lint: fix ruff warning PLC1901 (#301)"), with review approved by 1 reviewer, resolving the ruff PLC1901 warnings project-wide.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? ----- Resolves: - `PLC1901`: `string == ""` can be simplified to `not string` as an empty string is falsey

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved 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.
qwen/qwen3.6-35b-a3b — closed resolved Merged PR simplifying `string == ""` checks to `not string` to resolve ruff PLC1901 lint warnings across four files.

Update history

Date Change
created

Related work

  • Related To: canonical/craft-providers#288 (confidence 70%)

    Merged in commit 42a7920, which introduced the ruff lint configuration that surfaced the PLC1901 warnings this PR fixed.

Related issues

Issue Project State Summary Similarity
#907 style: adjust linting rules for ruff 0.12 rockcraft merged Merged into main as 186cb0fb, updating Ruff 0.12 settings to ignore PLC0415 and avoid unnecessary noqa comments.
79%
#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.
77%
#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).
76%
#303 lint: fix ruff warnings SIM108, SIM112, SIM117, TRY300 craft-providers merged Merged #303, applying Ruff fixes for SIM108, SIM112, SIM117, and TRY300 across five files; changes landed in commit 2d082e2.
76%
#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.
75%
#423 style(lint): fix ruff 0.6.0 linting errors craft-application merged Merged PR #423 as commit 2f56f14b, applying ruff check --fix across 21 files (+70/-70) to clear the new Ruff 0.6.0 lint errors. Approved by 2 maintainer reviewers.
75%
#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.
74%
#4981 style(lint): fix ruff 0.6 linting errors snapcraft merged Merged PR #4981 as commit 3a1b8a949, fixing Ruff 0.6 lint errors with a minimal one-file change.
74%
#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.
74%
#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%