Skip to content

Ruff152#346

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

Ruff152#346
inducer merged 2 commits intomainfrom
ruff152

Conversation

@inducer
Copy link
Owner

@inducer inducer commented Feb 20, 2026

Closes #345

Copilot AI review requested due to automatic review settings February 20, 2026 19:04
@inducer inducer enabled auto-merge (rebase) February 20, 2026 19:05
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 appears focused on addressing updated Ruff lint/type-checking expectations (and a few small refactors) across pytools, including typing-variance cleanup and targeted lint suppressions.

Changes:

  • Updated typing TypeVar names to explicitly encode variance (e.g., T_co, R_co) and propagated through public type aliases/signatures.
  • Added/adjusted Ruff configuration and inline noqa suppressions for intentional exec usage and self-comparison patterns.
  • Minor cleanups/refactors in tests and small runtime code paths (e.g., simplifying returns, using extend with a generator).

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pytools/test/test_pytools.py Switches object-array imports to from pytools import obj_array.
pytools/test/test_persistent_dict.py Refactors assertions to use loop values directly; adds a Ruff suppression for NaN self-compare.
pytools/py_codegen.py Adds # noqa: S102 on intentional exec calls.
pytools/prefork.py Simplifies wait() implementation.
pytools/obj_array.py Renames TT_co and updates many typing signatures/type aliases accordingly.
pytools/datatable.py Uses extend with a generator in join() to build result rows.
pytools/__init__.py Renames RR_co, updates generics, and performs small return simplifications.
pyproject.toml Expands Ruff ignore list and adds per-file ignores for S102.
.basedpyright/baseline.json Updates baseline positions to reflect new typing changes.

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

@inducer inducer merged commit f802f0d into main Feb 20, 2026
20 checks passed
@inducer inducer deleted the ruff152 branch February 20, 2026 19:55
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.

3 participants