Skip to content

Comments

Ruff152#264

Merged
inducer merged 2 commits intomainfrom
ruff152
Feb 21, 2026
Merged

Ruff152#264
inducer merged 2 commits intomainfrom
ruff152

Conversation

@inducer
Copy link
Owner

@inducer inducer commented Feb 21, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 21, 2026 05:07
Copy link

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 applies automated Ruff linting fixes (RUF152 and related rules) to improve code quality and consistency across the sumpy codebase. The changes include import standardization, return statement simplification, type annotation improvements, and removal of unnecessary code patterns.

Changes:

  • Consolidated imports from pytools and scipy to use consistent patterns
  • Simplified return statements by removing intermediate variables
  • Converted for-loops to list comprehensions/generator expressions where appropriate
  • Improved type annotations using Self and AbstractSet
  • Removed unreachable code and unnecessary global declarations
  • Updated Ruff configuration and type checker baseline

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated no comments.

Show a summary per file
File Description
sumpy/toys.py Consolidated pytools imports into single line
sumpy/tools.py Renamed Set to AbstractSet, simplified return statements
sumpy/test/test_misc.py Simplified return statement
sumpy/test/test_matrixgen.py Consolidated pytools import
sumpy/test/test_kernels.py Consolidated pytools import
sumpy/test/test_fmm.py Consolidated pytools import
sumpy/test/geometries.py Changed scipy.fftpack import style
sumpy/test/curve.py Changed scipy.fftpack import style
sumpy/symbolic.py Removed unreachable raise statement
sumpy/qbx.py Consolidated pytools imports, simplified return statements
sumpy/point_calculus.py Consolidated pytools imports
sumpy/p2p.py Consolidated pytools imports, simplified return statements
sumpy/p2e.py Simplified return statements
sumpy/kernel.py Changed return type to Self, converted for-loops to list comprehensions
sumpy/fmm.py Consolidated pytools imports, added assertion, simplified return statements
sumpy/expansion/m2l.py Simplified return statements throughout
sumpy/expansion/init.py Simplified return statements, converted for-loop to extend with generator
sumpy/e2p.py Consolidated pytools imports, simplified return statements
sumpy/e2e.py Added override decorator and return type annotation, simplified return statements
sumpy/distributed.py Consolidated pytools imports, converted for-loop to list comprehension
sumpy/codegen.py Renamed Set to AbstractSet in imports, simplified return statement
sumpy/init.py Removed unnecessary global declaration
pyproject.toml Added Ruff rule ignores (TRY004, TRY300) and per-file ignores for S102
.basedpyright/baseline.json Updated type checker baseline after code improvements

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

@inducer inducer merged commit 7bcab92 into main Feb 21, 2026
9 checks passed
@inducer inducer deleted the ruff152 branch February 21, 2026 05:47
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