Skip to content

style(ruff): enable SIM108 check and use ternary expressions - #242

Merged
schwehr merged 1 commit into
mainfrom
ruff-sim108
Sep 23, 2026
Merged

schwehr merged 1 commit into
mainfrom
ruff-sim108

Conversation

@schwehr

@schwehr schwehr commented Sep 23, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI lite review requested due to automatic review settings September 23, 2026 21:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Remaining SIM108 violations will cause lint checks to fail.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

Enables Ruff’s SIM108 rule and converts two conditional assignments to ternary expressions.

Changes:

  • Removes SIM108 from Ruff’s ignore list.
  • Refactors eligible assignments in BitVector.py.
File Description
pyproject.toml Enables SIM108 linting.
BitVector/​BitVector.py Converts two conditional assignments to ternaries; additional violations remain.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pyproject.toml
@@ -111,7 +111,6 @@ ignore = [
"PTH123", # builtin-open
"S101", # assert
"SIM103", # needless-bool
@schwehr
schwehr merged commit fe8e9c0 into main Sep 23, 2026
9 checks passed
@schwehr
schwehr deleted the ruff-sim108 branch September 23, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants