Skip to content

chore: add ruff linter with pre-commit hooks#10

Merged
shaia merged 2 commits intomasterfrom
chore/add-ruff-linter
Dec 5, 2025
Merged

chore: add ruff linter with pre-commit hooks#10
shaia merged 2 commits intomasterfrom
chore/add-ruff-linter

Conversation

@shaia
Copy link
Copy Markdown
Owner

@shaia shaia commented Dec 5, 2025

Replace black, isort, and flake8 with ruff for faster linting. Configure ruff with sensible defaults and per-file ignores for re-exports and test fixtures. Fix all existing lint violations.

Replace black, isort, and flake8 with ruff for faster linting.
Configure ruff with sensible defaults and per-file ignores for
re-exports and test fixtures. Fix all existing lint violations.
Copy link
Copy Markdown

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 replaces the existing linting toolchain (black, isort, and flake8) with ruff, a faster all-in-one Python linter and formatter. The migration includes configuration updates, pre-commit hook setup, and automated formatting fixes across the entire Python codebase.

Key changes:

  • Migrated from black, isort, and flake8 to ruff for improved performance
  • Added comprehensive ruff configuration with sensible defaults and per-file ignores
  • Set up pre-commit hooks for automated linting and formatting
  • Applied automated formatting fixes throughout the codebase (quote style, import ordering, line breaks)

Reviewed changes

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

Show a summary per file
File Description
pyproject.toml Replaced black/isort/flake8 dependencies with ruff; added comprehensive ruff configuration with per-file ignores
.pre-commit-config.yaml Added pre-commit hooks for ruff linting and formatting
tests/*.py Applied automated formatting: double quotes, import ordering, trailing commas, line length compliance
examples/*.py Applied automated formatting: double quotes, import ordering, function call formatting
scripts/setup_distribution.py Applied automated formatting: import ordering, function call formatting
dev_build.py Applied automated formatting: import ordering, multi-line string formatting
cfd_python/init.py Applied automated formatting: import ordering, quote style consistency

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

5, 5, steps=3,
output_file=str(output_file)
)
result = cfd_python.run_simulation(5, 5, steps=3, output_file=str(output_file))
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

Variable result is not used.

Suggested change
result = cfd_python.run_simulation(5, 5, steps=3, output_file=str(output_file))
cfd_python.run_simulation(5, 5, steps=3, output_file=str(output_file))

Copilot uses AI. Check for mistakes.
The test was missing the actual import statement inside the
pytest.raises block, causing it to never raise ImportError.
@shaia shaia merged commit 8630c97 into master Dec 5, 2025
9 checks passed
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