chore: migrate lint tool from isort+black to ruff#35
Merged
waketzheng merged 5 commits intotortoise:mainfrom Jun 26, 2025
Merged
chore: migrate lint tool from isort+black to ruff#35waketzheng merged 5 commits intotortoise:mainfrom
waketzheng merged 5 commits intotortoise:mainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the linting tool from isort+black to ruff while adjusting style commands and dependency groups. Key changes include:
- Replacing isort+black checks with ruff in tests and Makefile.
- Updating pyproject.toml to remove isort/black and reorganize dependency groups.
- Running auto-formatting via
make styleand rolling back some unwanted changes.
Reviewed Changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_tuples.py | Normalized SQL string formatting in tuple equality and IN clause tests. |
| tests/test_selects.py | Unified SQL string literals in SELECT query tests. |
| tests/test_query.py | Simplified SQL string formatting for query replacement tests. |
| tests/test_joins.py | Consolidated SQL syntax strings in join query tests. |
| tests/test_inserts.py | Merged split string literals in INSERT statements. |
| tests/test_functions.py | Adjusted complex operation tests for improved clarity. |
| tests/test_analytic_queries.py | Revised analytic query SQL formatting to a single-string format. |
| tests/dialects/test_postgresql.py | Updated PostgreSQL JSON-related SQL string formatting. |
| pyproject.toml | Removed isort/black, updated ruff settings and reorganized dependency groups. |
| pypika_tortoise/utils.py | Replaced list with tuple for attribute name checks. |
| pypika_tortoise/queries.py | Refactored conditional checks and SQL formatting expressions. |
| pypika_tortoise/functions.py | Minor change to COUNT star parameter condition for clarity. |
| pypika_tortoise/dialects/sqlite.py | Aligned conditional expressions for FROM clause formatting. |
| pypika_tortoise/dialects/postgresql.py | Consistent conditional refactoring as in the sqlite dialect. |
| Makefile | Replaced black with ruff in style/lint targets and updated dependency installs. |
Comments suppressed due to low confidence (1)
Makefile:19
- [nitpick] Confirm that using 'ruff format --check' in the CI pipeline aligns with the team's formatting policies, as it now replaces the previous black checker.
ruff format --check $(checkfiles) || (echo "Please run 'make style' to auto-fix style issues" && false)
henadzit
reviewed
Jun 19, 2025
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.
Description
make style