Skip to content
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
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ci:
autofix_prs: false
autofix_prs: true
autoupdate_schedule: quarterly

repos:
Expand All @@ -12,21 +12,21 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/codespell-project/codespell
rev: v2.4.2
rev: v2.4.3
hooks:
- id: codespell
additional_dependencies:
- tomli
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
Expand All @@ -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]
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ You can use Docstringify in three modes:
```python
"""__description__"""


def say_hello(name: str = 'World') -> None:
"""
__description__
Expand Down
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 ",
]
2 changes: 1 addition & 1 deletion src/docstringify/nodes/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading