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 2dcae32 commit 6ee571d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 20 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.4
hooks:
- id: ruff
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
Expand Down
3 changes: 1 addition & 2 deletions grizzly/reduce/strategies/lithium.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
from logging import getLogger
from typing import TYPE_CHECKING, Iterator

from lithium.strategies import CheckOnly
from lithium.strategies import CheckOnly, Minimize, ReductionIterator
from lithium.strategies import CollapseEmptyBraces as LithCollapseEmptyBraces
from lithium.strategies import Minimize, ReductionIterator
from lithium.strategies import Strategy as LithStrategy
from lithium.testcases import Testcase as LithTestcase
from lithium.testcases import TestcaseAttrs, TestcaseChar, TestcaseJsStr, TestcaseLine
Expand Down
16 changes: 10 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ exclude_lines = [
"pragma: no cover",
]

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

[tool.mypy]
ignore_missing_imports = true
strict = true
Expand Down Expand Up @@ -64,6 +60,10 @@ filterwarnings = [
]
log_level = "DEBUG"

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

[tool.ruff.lint]
select = [
# flake8-comprehensions
Expand All @@ -74,14 +74,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 6ee571d

Please sign in to comment.