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

[ci] Replace isort and pyupgrade with ruff #464

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading