Skip to content

style: allow single-line if statements#133

Merged
yjoer merged 1 commit intomasterfrom
yj
Feb 13, 2026
Merged

style: allow single-line if statements#133
yjoer merged 1 commit intomasterfrom
yj

Conversation

@yjoer
Copy link
Owner

@yjoer yjoer commented Feb 13, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 13, 2026 12:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the repository’s Ruff lint configuration to allow single-line compound statements (via ignoring E701) and applies that style to a few notebook and benchmarking scripts.

Changes:

  • Ignore Ruff/Pycodestyle rule E701 (single-line compound statements like if x: y) in the shared Ruff config.
  • Convert a handful of multi-line if/for blocks into single-line statements in notebooks and an HTTP benchmark script.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/config/ruff.toml Ignores E701, enabling single-line compound statements across the repo.
notebooks/reinforcement_learning/frozen_lake.py Rewrites simple if blocks into single-line if ...: ....
notebooks/random/simple_benchmarks.py Rewrites a for loop and an early-return if into single-line forms.
notebooks/machine_learning/nmf.py Rewrites two guard/assignment if blocks into single-line statements.
examples/http/_bench/benchmark.py Rewrites a loop break condition into a single-line if ...: break.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yjoer yjoer merged commit 10eb914 into master Feb 13, 2026
15 checks passed
@yjoer yjoer deleted the yj branch February 13, 2026 12:35
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.

1 participant