Skip to content

Commit 0e73c31

Browse files
authored
style: sets ruff docstring-code-line-length to dynamic (#171)
1 parent 073c01d commit 0e73c31

File tree

3 files changed

+7
-19
lines changed

3 files changed

+7
-19
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ version_file = "src/posit/_version.py"
3434

3535
[tool.ruff.format]
3636
docstring-code-format = true
37-
docstring-code-line-length = 20
37+
docstring-code-line-length = "dynamic"
3838

3939
[tool.ruff.lint]
4040
select = ["D"]

src/posit/connect/urls.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,10 @@ def create(url: str) -> Url:
3131
3232
Examples
3333
--------
34-
>>> urls.create(
35-
... "http://example.com"
36-
... )
34+
>>> urls.create("http://example.com")
3735
http://example.com/__api__
3836
39-
>>> urls.create(
40-
... "http://example.com/__api__"
41-
... )
37+
>>> urls.create("http://example.com/__api__")
4238
http://example.com/__api__
4339
4440
"""
@@ -77,12 +73,8 @@ def append(url: Url, path: str) -> Url:
7773
7874
Examples
7975
--------
80-
>>> url = urls.create(
81-
... "http://example.com/__api__"
82-
... )
83-
>>> urls.append(
84-
... url, "path"
85-
... )
76+
>>> url = urls.create("http://example.com/__api__")
77+
>>> urls.append(url, "path")
8678
http://example.com/__api__/path
8779
"""
8880
# Removes leading '/' from path to avoid double slashes.

tests/posit/connect/api.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@ def load_mock(path: str) -> dict:
2525
2626
Examples
2727
--------
28-
>>> data = load_mock(
29-
... "v1/example.json"
30-
... )
31-
>>> data = load_mock(
32-
... "v1/example.jsonc"
33-
... )
28+
>>> data = load_mock("v1/example.json")
29+
>>> data = load_mock("v1/example.jsonc")
3430
"""
3531
return json.loads((Path(__file__).parent / "__api__" / path).read_text())

0 commit comments

Comments
 (0)