Skip to content

Commit

Permalink
[ci] Replace isort and pyupgrade with ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
tysmith committed Sep 17, 2024
1 parent d157535 commit 26036fd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
15 changes: 3 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
repos:
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/asottile/pyupgrade
rev: v3.16.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.5
hooks:
- id: pyupgrade
args: ["--py38-plus"]
- id: ruff
- repo: https://github.com/ambv/black
rev: 24.8.0
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.3
hooks:
- id: ruff
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
Expand Down
16 changes: 10 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ exclude_lines = [
"pragma: no cover",
]

[tool.isort]
known_first_party = "ffpuppet"
profile = "black"

[tool.mypy]
ignore_missing_imports = true
strict = true
Expand Down Expand Up @@ -55,6 +51,10 @@ ignored-modules = ["pytest"]
[tool.pytest.ini_options]
log_level = "DEBUG"

[tool.ruff]
fix = true
target-version = "py38"

[tool.ruff.lint]
select = [
# flake8-comprehensions
Expand All @@ -65,14 +65,18 @@ select = [
"F",
# Flynt
"FLY",
# isort
"I",
# Perflint
"PERF",
# Ruff-specific rules
"RUF",
# flake8-simplify
"SIM",
# flake8-type-checking
"TCH",
# Ruff-specific rules
"RUF",
# pyupgrade
"UP",
# pycodestyle
"W",
]
Expand Down

0 comments on commit 26036fd

Please sign in to comment.