Skip to content

Commit 78a1063

Browse files
chore: Replace isort, flake8, black and pyupgrade with Ruff (#278)
It's 1 faster tool 🙂
1 parent cfd0ca6 commit 78a1063

File tree

7 files changed

+81
-196
lines changed

7 files changed

+81
-196
lines changed

.flake8

Lines changed: 0 additions & 5 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,12 @@ repos:
1717
exclude: (copier_template/.*|docs/.*|samples/.*\.json)
1818
- id: trailing-whitespace
1919

20-
- repo: https://github.com/psf/black
21-
rev: 23.12.1
20+
- repo: https://github.com/astral-sh/ruff-pre-commit
21+
rev: v0.1.14
2222
hooks:
23-
- id: black
24-
exclude: |
25-
(?x)^(
26-
copier_template/.*
27-
)$
28-
29-
- repo: https://github.com/pycqa/isort
30-
rev: 5.13.2
31-
hooks:
32-
- id: isort
33-
exclude: (copier_template/.*)
34-
35-
- repo: https://github.com/pycqa/flake8
36-
rev: 7.0.0
37-
hooks:
38-
- id: flake8
39-
additional_dependencies:
40-
- flake8-docstrings==1.6.0
41-
42-
- repo: https://github.com/asottile/pyupgrade
43-
rev: v3.15.0
44-
hooks:
45-
- id: pyupgrade
46-
args: [--py37-plus]
23+
- id: ruff
24+
args: [--fix]
25+
- id: ruff-format
4726

4827
- repo: https://github.com/pre-commit/mirrors-mypy
4928
rev: 'v1.8.0'

poetry.lock

Lines changed: 28 additions & 122 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ packages = [
3131
]
3232

3333
[tool.poetry.dependencies]
34-
python = "<3.13,>=3.8.1"
34+
python = "<3.13,>=3.8"
3535
requests = "^2.25.1"
3636
singer-sdk = ">=0.28,<0.35"
3737
psycopg2-binary = "2.9.9"
@@ -42,9 +42,7 @@ sshtunnel = "0.4.0"
4242
pytest = "^7.4.2"
4343
mypy = "^1.6.1"
4444
remote-pdb="2.1.0"
45-
black = "^23.1.0"
46-
flake8 = ">=6,<8"
47-
isort = "^5.10.1"
45+
ruff = "^0.1.14"
4846
tox = "^4"
4947
types-paramiko = "^3.3.0.0"
5048
types-simplejson = "^3.19.0.2"
@@ -58,11 +56,6 @@ exclude = "tests"
5856
module = ["sshtunnel"]
5957
ignore_missing_imports = true
6058

61-
[tool.isort]
62-
profile = "black"
63-
multi_line_output = 3 # Vertical Hanging Indent
64-
src_paths = "target_postgres"
65-
6659
[build-system]
6760
requires = ["poetry-core==1.8.1", "poetry-dynamic-versioning==1.2.0"]
6861
build-backend = "poetry_dynamic_versioning.backend"
@@ -80,3 +73,17 @@ pythonpath = [
8073
enable = true
8174
vcs = "git"
8275
style = "semver"
76+
77+
[tool.ruff]
78+
select = [
79+
"F", # Pyflakes
80+
"W", # pycodestyle warnings
81+
"E", # pycodestyle errors
82+
"I", # isort
83+
"N", # pep8-naming
84+
"D", # pydocsyle
85+
]
86+
target-version = "py38"
87+
88+
[tool.ruff.pydocstyle]
89+
convention = "google"

0 commit comments

Comments
 (0)