Skip to content

Ruff152#638

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

Ruff152#638
inducer merged 3 commits intomainfrom
ruff152

Conversation

@inducer
Copy link
Owner

@inducer inducer commented Feb 20, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 20, 2026 19:19
@inducer inducer enabled auto-merge (rebase) February 20, 2026 19:21
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 implements Ruff linting rule fixes (likely "Ruff152" or a batch of Ruff rules) to improve code quality and consistency across the pytato codebase. The changes focus on modernizing imports, removing unnecessary code, improving type annotations, and adding appropriate linting suppressions.

Changes:

  • Removed unnecessary shebang lines from test files and examples
  • Modernized import statements to use more Pythonic styles
  • Improved type annotations (e.g., SetAbstractSet, OrderCF simplification, __eq__ parameter types)
  • Simplified redundant code patterns (e.g., range(0, n)range(n), unnecessary intermediate variables)
  • Added appropriate noqa comments for intentional use of flagged patterns
  • Updated Ruff configuration to ignore specific rules where appropriate
  • Removed unnecessary pass statements in empty class bodies with docstrings

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
test/test_pytato.py Removed shebang, added noqa for intentional self-comparison test
test/test_linalg.py Removed shebang
test/test_distributed.py Optimized dictionary iteration, modernized mpi4py import
test/test_codegen.py Simplified range() calls, removed intermediate variable, inline return
test/test_apps.py Removed shebang
pytato/visualization/fancy_placeholder_data_flow.py Removed unnecessary pass statement
pytato/visualization/dot.py Converted loop to list comprehension
pytato/transform/metadata.py Removed unnecessary pass statements
pytato/transform/init.py Fixed logger initialization, removed unnecessary pass statement
pytato/target/python/init.py Removed unnecessary pass, added noqa for intentional exec()
pytato/target/loopy/codegen.py Modernized import, simplified dictionary unpacking
pytato/scalar_expr.py Improved type annotations with AbstractSet, added @override decorator
pytato/reductions.py Fixed eq parameter type from Any to object
pytato/pad.py Modernized collections.abc import
pytato/distributed/partition.py Improved type annotations, inline return, modernized import
pytato/diagnostic.py Removed unnecessary pass statement
pytato/array.py Multiple improvements: Literal type simplification, re.VERBOSE, exec noqa, copy() return type, import modernization, list comprehension
pytato/init.py Modernized imports
pyproject.toml Added S102 ignores for test files and doc/conf.py, added TRY004/TRY300 global ignores
examples/mpi-distributed.py Removed shebang
examples/dg_tools.py Simplified range() call
examples/demo.py Removed shebang
examples/advection.py Inline return statement
.basedpyright/baseline.json Updated baseline reflecting type checking improvements

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

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