Skip to content

Conversation

@waketzheng
Copy link
Contributor

@waketzheng waketzheng commented Jun 16, 2025

Description

  1. isort+black -> ruff
  2. update code by make style
  3. move packages about pytest from dev group to test group dependencies

@waketzheng waketzheng requested review from abondar and henadzit June 16, 2025 08:26
@henadzit henadzit requested a review from Copilot June 19, 2025 12:00
Copy link

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 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 style and 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)

@waketzheng waketzheng requested a review from henadzit June 22, 2025 12:25
Copy link
Contributor

@henadzit henadzit left a comment

Choose a reason for hiding this comment

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

LGTM!

@waketzheng waketzheng merged commit e7bd550 into tortoise:main Jun 26, 2025
5 checks passed
@waketzheng waketzheng deleted the use-ruff branch June 26, 2025 04:58
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