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

feat: Replace black, flake8, isort & pydocstyle with Ruff #47

Merged
merged 12 commits into from
Sep 23, 2024
23 changes: 23 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-json
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.7
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
hooks:
- id: mypy
additional_dependencies:
- types-requests
haleemur marked this conversation as resolved.
Show resolved Hide resolved
166 changes: 28 additions & 138 deletions poetry.lock

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

33 changes: 29 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,45 @@ sqlalchemy = "~=2.0.34"
cryptography = ">=3.4.6,<42.0.0"

[tool.poetry.group.dev.dependencies]
black = "^22.3.0"
flake8 = "^3.9.2"
isort = "^5.10.1"
mypy = "^0.991"
pydocstyle = "^6.1.1"
singer-sdk = {extras = ["testing"], version = "*"}
tox = "^3.24.4"
types-requests = "^2.26.1"
ruff = "^0.6.7"

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

[tool.ruff]
line-length = 88
src = ["target_snowflake"]
target-version = "py38"

[tool.ruff.lint]
ignore = [
"ANN001",
"ANN401",
"S608",
"SLF001",
"EM101",
]
select = ["ALL"]

[tool.ruff.format]
quote-style = "double"
exclude = ["*.pyi"]

[tool.ruff.lint.isort]
known-first-party = ["target_snowflake"]

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

[tool.ruff.lint.mccabe]
max-complexity = 10

[build-system]
requires = ["poetry-core>=1.0.8", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"
Expand Down
Loading
Loading