diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d4a2f18..f8de1ce 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,12 +4,12 @@ ci: repos: - repo: https://github.com/psf/black - rev: 23.12.1 + rev: 24.1.1 hooks: - id: black - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.9 + rev: v0.2.1 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/pyproject.toml b/pyproject.toml index f6f09bf..3c71af2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -123,6 +123,8 @@ ignore_errors = true [tool.ruff] src = ["src", "tests"] + +[tool.lintruff] select = ["ALL"] ignore = [ @@ -135,7 +137,7 @@ ignore = [ "TRY301", # Raise in try blocks can totally make sense. ] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "src/hatch_fancy_pypi_readme/_cli.py" = ["T201"] # need print in CLI "tests/*" = [ "PLC1901", # empty strings are falsey, but are less specific in tests @@ -144,6 +146,6 @@ ignore = [ "SIM300", # Yoda rocks in tests ] -[tool.ruff.isort] +[tool.ruff.lint.isort] lines-between-types = 1 lines-after-imports = 2 diff --git a/src/hatch_fancy_pypi_readme/_fragments.py b/src/hatch_fancy_pypi_readme/_fragments.py index f2c6c0a..5ce17bf 100644 --- a/src/hatch_fancy_pypi_readme/_fragments.py +++ b/src/hatch_fancy_pypi_readme/_fragments.py @@ -24,11 +24,9 @@ class Fragment(Protocol): key: ClassVar[str] @classmethod - def from_config(cls, cfg: dict[str, str]) -> Fragment: - ... + def from_config(cls, cfg: dict[str, str]) -> Fragment: ... - def render(self) -> str: - ... + def render(self) -> str: ... @dataclass