From 6255297fa96bc3f95a1662c8d8181361f1fcce48 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 6 Oct 2026 01:08:36 +0000 Subject: [PATCH 1/3] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/codespell-project/codespell: v2.4.2 → v2.4.3](https://github.com/codespell-project/codespell/compare/v2.4.2...v2.4.3) - [github.com/numpy/numpydoc: v1.10.0 → v1.11.0](https://github.com/numpy/numpydoc/compare/v1.10.0...v1.11.0) - [github.com/stefmolin/docstringify: 1decb1a66b512ab792fdc0d190a7ba761b3d70fd → 2.0.0](https://github.com/stefmolin/docstringify/compare/1decb1a66b512ab792fdc0d190a7ba761b3d70fd...2.0.0) - [github.com/astral-sh/ruff-pre-commit: v0.15.12 → v0.16.10](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.12...v0.16.10) - [github.com/tox-dev/pyproject-fmt: v2.21.1 → v2.30.1](https://github.com/tox-dev/pyproject-fmt/compare/v2.21.1...v2.30.1) --- .pre-commit-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 471367c..0b9ccdc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/codespell-project/codespell - rev: v2.4.2 + rev: v2.4.3 hooks: - id: codespell additional_dependencies: @@ -20,13 +20,13 @@ repos: exclude: (\.(svg|png|pdf)$)|(CODE_OF_CONDUCT.md) - repo: https://github.com/numpy/numpydoc - rev: v1.10.0 + rev: v1.11.0 hooks: - id: numpydoc-validation exclude: (tests|docs)/.* - repo: https://github.com/stefmolin/docstringify - rev: 1decb1a66b512ab792fdc0d190a7ba761b3d70fd + rev: 2.0.0 hooks: - id: docstringify-edit name: docstringify source code with numpydoc style @@ -38,14 +38,14 @@ repos: files: tests/.* - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.12 + rev: v0.16.10 hooks: - id: ruff-check args: [--fix, --exit-non-zero-on-fix, --show-fixes] - id: ruff-format - repo: https://github.com/tox-dev/pyproject-fmt - rev: v2.21.1 + rev: v2.30.1 hooks: - id: pyproject-fmt args: [--keep-full-version, --no-print-diff] From c37e21adea9d99568a777f8c2409206da963f187 Mon Sep 17 00:00:00 2001 From: Stefanie Molin <24376333+stefmolin@users.noreply.github.com> Date: Sat, 17 Oct 2026 06:48:15 -0400 Subject: [PATCH 2/3] Enable autofix for pull requests in pre-commit config --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0b9ccdc..7c34e02 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,5 @@ ci: - autofix_prs: false + autofix_prs: true autoupdate_schedule: quarterly repos: From b1a12c39fe39d033c4d94ed83489ee2b303907c2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 17 Oct 2026 10:48:23 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- README.md | 1 + pyproject.toml | 7 +++++-- src/docstringify/nodes/function.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f603651..eb1dc99 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,7 @@ You can use Docstringify in three modes: ```python """__description__""" + def say_hello(name: str = 'World') -> None: """ __description__ diff --git a/pyproject.toml b/pyproject.toml index 8bbad27..e036dc7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,7 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", ] dependencies = [] urls.Documentation = "https://github.com/stefmolin/docstringify" @@ -94,11 +95,13 @@ checks = [ "SA01", # or a see also section "SS06", # and don't require the summary to fit on one line ] -exclude = [ # don't report on checks for these +exclude = [ + # don't report on checks for these "\\.__init__$", "\\.__repr__$", "\\.__str__$", ] -override_SS05 = [ # allow docstrings to start with these words +override_SS05 = [ + # allow docstrings to start with these words "^Unambiguous ", ] diff --git a/src/docstringify/nodes/function.py b/src/docstringify/nodes/function.py index 9532c44..a05cfcb 100644 --- a/src/docstringify/nodes/function.py +++ b/src/docstringify/nodes/function.py @@ -141,7 +141,7 @@ def _extract_parameter_type(self, arg: ast.arg) -> str: return self.get_source_segment(arg.annotation) or PARAMETER_TYPE_PLACEHOLDER def _extract_default_values( - self, default: ast.Constant | None | Literal[NO_DEFAULT], is_keyword_only: bool + self, default: ast.Constant | Literal[NO_DEFAULT] | None, is_keyword_only: bool ) -> str | Literal[NO_DEFAULT]: """ Extract the argument's default value.