Skip to content
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

chore: Replace isort, flake8, black and pyupgrade with Ruff #345

Merged
merged 3 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading