diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b0771b33..8036fb93 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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: diff --git a/grizzly/reduce/strategies/lithium.py b/grizzly/reduce/strategies/lithium.py index f6f83451..90ea474e 100644 --- a/grizzly/reduce/strategies/lithium.py +++ b/grizzly/reduce/strategies/lithium.py @@ -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 diff --git a/pyproject.toml b/pyproject.toml index c7a78e99..00d5586a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 @@ -64,6 +60,10 @@ filterwarnings = [ ] log_level = "DEBUG" +[tool.ruff] +fix = true +target-version = "py38" + [tool.ruff.lint] select = [ # flake8-comprehensions @@ -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", ]