Skip to content

Commit

Permalink
chore: Replace isort, flake8, black and pyupgrade with Ruff (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon authored Jan 26, 2024
1 parent fcc042f commit d456c38
Show file tree
Hide file tree
Showing 13 changed files with 323 additions and 344 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
workflow_dispatch:
inputs: {}

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
tests:
runs-on: ubuntu-latest
Expand Down
45 changes: 19 additions & 26 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,25 @@
ci:
autofix_prs: false
autoupdate_schedule: weekly
autoupdate_commit_msg: 'chore: pre-commit autoupdate'

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
rev: v4.5.0
hooks:
- id: check-yaml
- id: check-json
- id: check-toml
exclude: |
(?x)^(
copier_template/.*/pyproject.toml
)$
- id: end-of-file-fixer
exclude: (copier_template/.*|docs/.*|samples/.*\.json)
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.10.0

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/python-poetry/poetry
rev: 1.3.2
hooks:
- id: poetry-check
- id: poetry-lock
args: [--no-update]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v0.991'
hooks:
- id: mypy
exclude: tests
additional_dependencies:
- types-paramiko
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
- id: ruff
args: [--fix]
- id: ruff-format
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,4 +261,4 @@ Note also that using log-based replication will cause the replication key for al
"*":
replication_method: LOG_BASED
replication_key: _sdc_lsn
```
```
2 changes: 1 addition & 1 deletion log_based/init.sql
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SELECT * FROM pg_create_logical_replication_slot('tappostgres', 'wal2json');
SELECT * FROM pg_create_logical_replication_slot('tappostgres', 'wal2json');
209 changes: 88 additions & 121 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d456c38

Please sign in to comment.