Skip to content

Commit 114e083

Browse files
committed
Remove D200 ignore by lowering pydocstringformatter line length to 75
1 parent 31dfe8c commit 114e083

File tree

14 files changed

+95
-25
lines changed

14 files changed

+95
-25
lines changed

bun.lock

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example.txt

Whitespace-only changes.

issue.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
URLs are broken when reflowing paragraphs
2+
3+
## Version
4+
5+
0.7.3
6+
7+
## Example
8+
9+
Input file:
10+
11+
```python
12+
"""For more information see https://example.com/documentation/api/v2/reference/getting-started#authentication or contact support."""
13+
```
14+
15+
Output after running `pydocstringformatter --linewrap-full-docstring`:
16+
17+
```diff
18+
--- issue.py
19+
+++ issue.py
20+
@@ -1,2 +1,5 @@
21+
-"""For more information see https://example.com/documentation/api/v2/reference/getting-started#authentication or contact support."""
22+
+"""For more information see https://example.com/documentation/api/v2/reference/getting-.
23+
+
24+
+started#authentication or contact support.
25+
+"""
26+
```
27+
28+
The URL is broken across two lines, making it impossible to click.

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"dependencies": {},
3+
"devDependencies": {
4+
"prettier": "3.7.4"
5+
}
6+
}

pyproject.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,7 @@ lint.ignore = [
120120
# Ruff warns that this conflicts with the formatter.
121121
"COM812",
122122
# Allow our chosen docstring line-style - pydocstringformatter handles formatting
123-
# but may conflict with D200 at the line-length boundary, and doesn't enforce
124-
# D205 (blank line after summary) or D212 (summary on first line).
125-
"D200",
123+
# but doesn't enforce D205 (blank line after summary) or D212 (summary on first line).
126124
"D205",
127125
"D212",
128126
# Ruff warns that this conflicts with the formatter.
@@ -348,7 +346,10 @@ typeCheckingMode = "strict"
348346
[tool.pydocstringformatter]
349347
write = true
350348
split-summary-body = false
351-
max-line-length = 79
349+
# Use a lower line length than ruff (79) to avoid conflicts with D200 -
350+
# pydocstringformatter would otherwise split docstrings at exactly 79 chars
351+
# which ruff considers should stay on one line.
352+
max-line-length = 75
352353
linewrap-full-docstring = true
353354

354355
[tool.interrogate]

src/vws/exceptions/base_exceptions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""
2-
Base exceptions for errors returned by Vuforia Web Services or the Vuforia
2+
Base exceptions for errors returned by Vuforia Web Services or the
3+
Vuforia
34
Cloud Recognition Web API.
45
"""
56

src/vws/exceptions/cloud_reco_exceptions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
"""Exceptions which match errors raised by the Vuforia Cloud Recognition Web
1+
"""Exceptions which match errors raised by the Vuforia Cloud Recognition
2+
Web
23
APIs.
34
"""
45

src/vws/exceptions/vws_exceptions.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
"""
2-
Exception raised when Vuforia returns a response with a result code matching
2+
Exception raised when Vuforia returns a response with a result code
3+
matching
34
one of those documented at
4-
https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#result-codes.
5+
https://developer.vuforia.com/library/web-api/cloud-targets-web-services-
6+
api#result-codes.
57
"""
68

79
import json

src/vws/query.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ def query(
6868
CloudRecoIncludeTargetData.TOP
6969
),
7070
) -> list[QueryResult]:
71-
"""Use the Vuforia Web Query API to make an Image Recognition Query.
71+
"""Use the Vuforia Web Query API to make an Image Recognition
72+
Query.
7273
7374
See
7475
https://developer.vuforia.com/library/web-api/vuforia-query-web-api

src/vws/vws.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,8 @@ def delete_target(self, target_id: str) -> None:
567567
)
568568

569569
def get_duplicate_targets(self, target_id: str) -> list[str]:
570-
"""Get targets which may be considered duplicates of a given target.
570+
"""Get targets which may be considered duplicates of a given
571+
target.
571572
572573
See
573574
https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#check.

0 commit comments

Comments
 (0)