Skip to content

Update config, fix lints for ruff 0.15.2#500

Merged
inducer merged 1 commit intomainfrom
ruff152
Feb 22, 2026
Merged

Update config, fix lints for ruff 0.15.2#500
inducer merged 1 commit intomainfrom
ruff152

Conversation

@inducer
Copy link
Owner

@inducer inducer commented Feb 22, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 22, 2026 19:58
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 pull request updates the project configuration and fixes linting issues to comply with ruff 0.15.2. The changes include modernizing import statements, removing unnecessary code, correcting spelling errors, and adjusting linting rules in the configuration.

Changes:

  • Converted import pycuda.gpuarray as gpuarray to from pycuda import gpuarray throughout the codebase
  • Removed redundant shebangs and unnecessary variable assignments
  • Fixed spelling errors and simplified code patterns
  • Updated pyproject.toml to ignore new ruff rules and add per-file exceptions

Reviewed changes

Copilot reviewed 47 out of 47 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/undistributed/measure_gpuarray_speed.py Updated gpuarray import to use from-import style
test/undistributed/elwise-perf.py Updated gpuarray import to use from-import style
test/test_gpuarray.py Removed shebang, updated imports, simplified range calls
test/test_driver.py Updated multiple imports to use from-import style
test/test_cumath.py Consolidated imports into single from-import statement
setup.py Removed shebang
pyproject.toml Added BLE001 to ignore list and S102 to per-file ignores
pycuda/tools.py Fixed spelling error, added noqa comment, simplified conditional
pycuda/sparse/pkt_build.py Updated gpuarray import to use from-import style
pycuda/sparse/packeted.py Updated gpuarray import to use from-import style
pycuda/sparse/inner.py Updated gpuarray import to use from-import style
pycuda/sparse/coordinate.py Updated gpuarray import to use from-import style
pycuda/sparse/cg.py Updated gpuarray import to use from-import style
pycuda/scan.py Consolidated imports into single from-import statement
pycuda/gpuarray.py Updated elementwise import and simplified return statement
pycuda/debug.py Added noqa comment for exec usage
pycuda/curandom.py Simplified conditional using tuple membership
pycuda/cumath.py Consolidated imports into single from-import statement
pycuda/compyte Updated subproject commit reference
pycuda/compiler.py Moved warn import to top level, improved exception handling, changed Exception to RuntimeError
pycuda/characterize.py Updated gpuarray import to use from-import style
pycuda/autoprimaryctx.py Removed redundant global declaration
pycuda/autoinit.py Removed redundant global declaration
examples/from-wiki/*.py Updated imports throughout example files
aksetup_helper.py Simplified print calls and refactored to use comprehensions

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

@inducer inducer merged commit c8448dc into main Feb 22, 2026
4 of 5 checks passed
@inducer inducer deleted the ruff152 branch February 22, 2026 20:06
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