Skip to content

Commit 52ee47c

Browse files
committed
Replace docformatter with pydocstringformatter
- Replace docformatter==1.7.7 with pydocstringformatter==0.7.3 - Replace [tool.docformatter] with [tool.pydocstringformatter] config - Update ruff ignore comments (D200 -> D205/D212) - Don't use linewrap-full-docstring to avoid breaking URLs (DanielNoord/pydocstringformatter#540)
1 parent f7e2a60 commit 52ee47c

File tree

83 files changed

+712
-1199
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+712
-1199
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ci:
2929
- ruff-check-fix-docs
3030
- ruff-format-fix
3131
- ruff-format-fix-docs
32-
- docformatter
32+
- pydocstringformatter
3333
- shellcheck
3434
- shellcheck-docs
3535
- shfmt
@@ -119,9 +119,9 @@ repos:
119119
additional_dependencies: [uv==0.9.5]
120120
stages: [pre-commit]
121121

122-
- id: docformatter
123-
name: docformatter
124-
entry: uv run --extra=dev -m docformatter --in-place
122+
- id: pydocstringformatter
123+
name: pydocstringformatter
124+
entry: uv run --extra=dev pydocstringformatter
125125
language: python
126126
types_or: [python]
127127
additional_dependencies: [uv==0.9.5]

docs/source/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
"""
2-
Documentation.
3-
"""
1+
"""Documentation."""

docs/source/conf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/usr/bin/env python3
2-
"""
3-
Configuration for Sphinx.
4-
"""
2+
"""Configuration for Sphinx."""
53

64
import importlib.metadata
75
from pathlib import Path

pyproject.toml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ optional-dependencies.dev = [
5757
"dirty-equals==0.11",
5858
"doc8==1.1.1",
5959
"doccmd==2026.1.25",
60-
"docformatter==1.7.7",
6160
"docker==7.1.0",
6261
"enum-tools[sphinx]==0.13.0",
6362
"freezegun==1.5.5",
@@ -66,6 +65,7 @@ optional-dependencies.dev = [
6665
"mypy[faster-cache]==1.19.1",
6766
"mypy-strict-kwargs==2026.1.12",
6867
"prek==0.3.0",
68+
"pydocstringformatter==0.7.3",
6969
"pydocstyle==6.3",
7070
"pylint[spelling]==4.0.4",
7171
"pylint-per-file-ignores==3.2.0",
@@ -152,8 +152,8 @@ lint.select = [
152152
lint.ignore = [
153153
# Ruff warns that this conflicts with the formatter.
154154
"COM812",
155-
# Allow our chosen docstring line-style - no one-line summary.
156-
"D200",
155+
# Allow our chosen docstring line-style - pydocstringformatter handles formatting
156+
# but doesn't enforce D205 (blank line after summary) or D212 (summary on first line).
157157
"D205",
158158
"D212",
159159
"D415",
@@ -298,9 +298,6 @@ spelling-private-dict-file = 'spelling_private_dict.txt'
298298
# --spelling-private-dict-file option instead of raising a message.
299299
spelling-store-unknown-words = 'no'
300300

301-
[tool.docformatter]
302-
make-summary-multi-line = true
303-
304301
[tool.check-manifest]
305302

306303
ignore = [
@@ -403,6 +400,12 @@ enableTypeIgnoreComments = false
403400
reportUnnecessaryTypeIgnoreComment = true
404401
typeCheckingMode = "strict"
405402

403+
[tool.pydocstringformatter]
404+
write = true
405+
split-summary-body = false
406+
max-line-length = 75
407+
linewrap-full-docstring = true
408+
406409
[tool.interrogate]
407410
fail-under = 100
408411
omit-covered-files = true

src/mock_vws/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
"""
2-
Tools for using a fake implementation of Vuforia.
3-
"""
1+
"""Tools for using a fake implementation of Vuforia."""
42

53
from mock_vws._requests_mock_server.decorators import (
64
MissingSchemeError,

src/mock_vws/_base64_decoding.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
"""
2-
Helpers for handling Base64 like Vuforia does.
3-
"""
1+
"""Helpers for handling Base64 like Vuforia does."""
42

53
import base64
64
import binascii

src/mock_vws/_constants.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
"""
2-
Constants used to make the VWS mock.
3-
"""
1+
"""Constants used to make the VWS mock."""
42

53
from enum import Enum, unique
64

src/mock_vws/_database_matchers.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
"""
2-
Helpers for getting databases which match keys given in requests.
3-
"""
1+
"""Helpers for getting databases which match keys given in requests."""
42

53
from collections.abc import Iterable, Mapping
64

@@ -19,7 +17,8 @@ def get_database_matching_client_keys(
1917
request_path: str,
2018
databases: Iterable[VuforiaDatabase],
2119
) -> VuforiaDatabase:
22-
"""Return the first of the given databases which is being accessed by the
20+
"""Return the first of the given databases which is being accessed by
21+
the
2322
given client request.
2423
2524
Args:
@@ -67,7 +66,8 @@ def get_database_matching_server_keys(
6766
request_path: str,
6867
databases: Iterable[VuforiaDatabase],
6968
) -> VuforiaDatabase:
70-
"""Return the first of the given databases which is being accessed by the
69+
"""Return the first of the given databases which is being accessed by
70+
the
7171
given server request.
7272
7373
Args:
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
"""
2-
Flask server for the mock Vuforia web service.
3-
"""
1+
"""Flask server for the mock Vuforia web service."""

src/mock_vws/_flask_server/healthcheck.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
"""
2-
Health check for the Flask server.
3-
"""
1+
"""Health check for the Flask server."""
42

53
import http.client
64
import socket
@@ -12,9 +10,7 @@
1210

1311
@beartype
1412
def flask_app_healthy(port: int) -> bool:
15-
"""
16-
Check if the Flask app is healthy.
17-
"""
13+
"""Check if the Flask app is healthy."""
1814
conn = http.client.HTTPConnection(host="localhost", port=port)
1915
try:
2016
conn.request(method="GET", url="/some-random-endpoint")

0 commit comments

Comments
 (0)