Skip to content

Commit

Permalink
chore: Replace isort, flake8, black and pyupgrade with Ruff (#278)
Browse files Browse the repository at this point in the history
It's 1 faster tool 🙂
  • Loading branch information
edgarrmondragon authored Jan 23, 2024
1 parent cfd0ca6 commit 78a1063
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 196 deletions.
5 changes: 0 additions & 5 deletions .flake8

This file was deleted.

31 changes: 5 additions & 26 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,12 @@ repos:
exclude: (copier_template/.*|docs/.*|samples/.*\.json)
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 23.12.1
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
hooks:
- id: black
exclude: |
(?x)^(
copier_template/.*
)$
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
exclude: (copier_template/.*)

- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
additional_dependencies:
- flake8-docstrings==1.6.0

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
args: [--py37-plus]
- id: ruff
args: [--fix]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.8.0'
Expand Down
150 changes: 28 additions & 122 deletions poetry.lock

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

25 changes: 16 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ packages = [
]

[tool.poetry.dependencies]
python = "<3.13,>=3.8.1"
python = "<3.13,>=3.8"
requests = "^2.25.1"
singer-sdk = ">=0.28,<0.35"
psycopg2-binary = "2.9.9"
Expand All @@ -42,9 +42,7 @@ sshtunnel = "0.4.0"
pytest = "^7.4.2"
mypy = "^1.6.1"
remote-pdb="2.1.0"
black = "^23.1.0"
flake8 = ">=6,<8"
isort = "^5.10.1"
ruff = "^0.1.14"
tox = "^4"
types-paramiko = "^3.3.0.0"
types-simplejson = "^3.19.0.2"
Expand All @@ -58,11 +56,6 @@ exclude = "tests"
module = ["sshtunnel"]
ignore_missing_imports = true

[tool.isort]
profile = "black"
multi_line_output = 3 # Vertical Hanging Indent
src_paths = "target_postgres"

[build-system]
requires = ["poetry-core==1.8.1", "poetry-dynamic-versioning==1.2.0"]
build-backend = "poetry_dynamic_versioning.backend"
Expand All @@ -80,3 +73,17 @@ pythonpath = [
enable = true
vcs = "git"
style = "semver"

[tool.ruff]
select = [
"F", # Pyflakes
"W", # pycodestyle warnings
"E", # pycodestyle errors
"I", # isort
"N", # pep8-naming
"D", # pydocsyle
]
target-version = "py38"

[tool.ruff.pydocstyle]
convention = "google"
Loading

0 comments on commit 78a1063

Please sign in to comment.