-
Couldn't load subscription status.
- Fork 11
chore: migrate lint tool from isort+black to ruff #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Description
make style