Merged
Conversation
- Remove [tool.black] and [tool.isort] configuration sections - Add ruff>=0.8.0 as development dependency - Configure [tool.ruff] with line-length=79, target-version=py311 - Set up [tool.ruff.format] with Black-compatible settings - Configure [tool.ruff.isort] with Django-aware import sorting - Add [tool.ruff.lint] with basic linting rules (E, F, W, I) - Exclude migrations directory from formatting and linting This maintains existing code style while consolidating formatting, import sorting, and linting into a single faster tool.
- Update pre-commit configuration to use Ruff instead of Black/isort - Add Ruff as development dependency in pyproject.toml - Configure Ruff with Django-aware import sorting and formatting rules - Apply Ruff formatting across entire codebase: - Fix import ordering and grouping - Remove unused imports and variables - Fix string formatting (remove f-string prefixes where unnecessary) - Improve code style consistency - Fix minor linting issues (unused variables, comparison style) - Update task completion status in migration spec - Maintain existing line length and formatting preferences This migration consolidates two tools (Black + isort) into one (Ruff) while maintaining code quality standards and improving development workflow efficiency.
- Update tech.md to reference Ruff as combined linter and formatter - Update structure.md to use Ruff for formatting and import sorting - Maintain 79-character line length configuration - Preserve Django-aware import sorting documentation
- Remove custom line-length setting (79 -> 88 chars default) - Remove custom exclude patterns, using Ruff's built-in defaults - Remove custom lint rule selections, using recommended rule set - Remove custom isort and format configurations - Keep Django-specific __init__.py wildcard import allowance - Update documentation to reflect simplified configuration
- Test formatting compatibility with existing codebase - Verify import sorting functionality and Django-aware organization - Validate pre-commit hooks execute correctly in containerized environment - Confirm migration files are properly excluded from formatting - Fix 31 import sorting issues and reformat 25 files during testing - All Ruff functionality working as expected with proper exclusion patterns
- Move linter settings to [tool.ruff.lint] section - Remove COM812 rule to avoid conflicts with formatter - Add COM812 to ignore list to prevent formatter conflicts - Maintain all existing rule selections and configurations Resolves warnings about deprecated top-level linter settings and formatter conflicts with COM812 rule.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- None values: Sets them to 0 - Negative values: Sets them to 0 - Positive values: Leaves them unchanged This preserves the original intent of the code while being more readable than the redundant max() calls.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request migrates the codebase from Black and isort to Ruff for Python code formatting and linting. The migration consolidates two tools into one faster alternative while maintaining the same code style standards.
- Replaced Black and isort configuration with comprehensive Ruff setup in pyproject.toml
- Updated pre-commit hooks to use Ruff instead of Black and isort
- Applied automatic formatting changes throughout the codebase including f-string removal, import reorganization, and trailing comma additions
Reviewed Changes
Copilot reviewed 58 out of 59 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| pyproject.toml | Replaced Black/isort config with comprehensive Ruff configuration and added Ruff dependency |
| .pre-commit-config.yaml | Updated hooks to use Ruff instead of Black and isort |
| Various Python files | Applied Ruff formatting including f-string simplification, import sorting, and style fixes |
| Documentation files | Updated references from Black/isort to Ruff in project documentation |
Comments suppressed due to low confidence (1)
coderdojochi/util.py:29
- [nitpick] The error message is overly verbose and redundant. Consider simplifying to: "Missing required parameters: subject, template_name, and recipients are required"
raise ValueError("Missing required parameters: 'subject', 'template_name', and 'recipients' are all required.")
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.