From 2b49b22e23279d2ae7da2f0b7baf03f392204c2b Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Sat, 27 Jul 2024 16:04:50 +0200 Subject: [PATCH] Fix lint error & remove black Related to #620 Update the lint script and configuration files to fix the lint error. And remove black because ruff replace it. * **scripts/lint.sh** - Update the `ruff` command to use `ruff check` instead of `ruff`. - Remove the `black` command. * **.github/workflows/lint.yml** - Remove `black` from the `Install dependencies` step. * **.pre-commit-config.yaml** - Remove the `black` dependency. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/julien-duponchelle/python-mysql-replication/issues/620?shareId=XXXX-XXXX-XXXX-XXXX). --- .github/workflows/lint.yml | 2 +- .pre-commit-config.yaml | 5 ----- scripts/lint.sh | 3 +-- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 69ef8095..5e20e696 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,7 +18,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install ruff black + pip install ruff - name: Run lint script run: bash scripts/lint.sh diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 95a94acd..4a2bf677 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,8 +12,3 @@ repos: hooks: - id: ruff args: [ --fix, --exit-non-zero-on-fix ] - -- repo: https://github.com/psf/black - rev: 23.7.0 - hooks: - - id: black diff --git a/scripts/lint.sh b/scripts/lint.sh index eee4960c..a1ce6aff 100644 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -3,5 +3,4 @@ set -e set -x -ruff pymysqlreplication -black pymysqlreplication --check +ruff check pymysqlreplication