From f1749af84f0a874abed5d24845c5419b84a97ebc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Thu, 15 Oct 2026 16:52:05 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Enable=20Ruff=20formatting=20for?= =?UTF-8?q?=20Python=20in=20Markdown?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- README.md | 2 ++ pyproject.toml | 2 +- uv.lock | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a3d03bf..c573655 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,7 +30,7 @@ repos: entry: uv run ruff format --force-exclude --exit-non-zero-on-format require_serial: true language: unsupported - types: [python] + types_or: [python, markdown] - id: local-mypy name: mypy check diff --git a/README.md b/README.md index 0698b1e..89b2df0 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ from typing import Annotated from annotated_doc import Doc + def hi(name: Annotated[str, Doc("Who to say hi to")]) -> None: print(f"Hi, {name}!") ``` @@ -49,6 +50,7 @@ from typing import Annotated from annotated_doc import Doc + class User: name: Annotated[str, Doc("The user's name")] age: Annotated[int, Doc("The user's age")] diff --git a/pyproject.toml b/pyproject.toml index 0052712..67eeae0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ tests = [ "coverage[toml]>=7.6.1", "mypy==1.14.1", "pytest>=8.3.5", - "ruff>=0.15.14", + "ruff>=0.16.0", "smokeshow>=0.5.0", "ty>=0.0.25", "typer>=0.16.1", diff --git a/uv.lock b/uv.lock index 71e1126..7331afc 100644 --- a/uv.lock +++ b/uv.lock @@ -47,7 +47,7 @@ dev = [ { name = "mypy", specifier = "==1.14.1" }, { name = "prek", specifier = ">=0.2.24,<1.0.0" }, { name = "pytest", specifier = ">=8.3.5" }, - { name = "ruff", specifier = ">=0.15.14" }, + { name = "ruff", specifier = ">=0.16.0" }, { name = "smokeshow", specifier = ">=0.5.0" }, { name = "ty", specifier = ">=0.0.25" }, { name = "typer", specifier = ">=0.16.1" }, @@ -57,7 +57,7 @@ tests = [ { name = "coverage", extras = ["toml"], specifier = ">=7.6.1" }, { name = "mypy", specifier = "==1.14.1" }, { name = "pytest", specifier = ">=8.3.5" }, - { name = "ruff", specifier = ">=0.15.14" }, + { name = "ruff", specifier = ">=0.16.0" }, { name = "smokeshow", specifier = ">=0.5.0" }, { name = "ty", specifier = ">=0.0.25" }, { name = "typer", specifier = ">=0.16.1" },