Skip to content

Commit 2e29c18

Browse files
committed
docs: fixed links
1 parent 1ef5ce5 commit 2e29c18

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

docs/external/external.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This has the advantage that you can easily see changes in code reviews. However,
77
`external()` solves this problem and integrates nicely with inline snapshots.
88
It stores a reference to the external data in a special `external()` object, which can be used like `snapshot()`.
99

10-
There are different storage protocols, such as [*hash*](#hash) or [*uuid*](#uuid), and different file formats, such as *.txt*, *.bin*, and *.json*. It is also possible to implement [*custom*](#custom-formats) file formats.
10+
There are different storage protocols, such as [*hash*](#hash) or [*uuid*](#uuid), and different file formats, such as *.txt*, *.bin*, and *.json*. It is also possible to implement [*custom*](register_format.md) file formats.
1111

1212

1313
Example:

docs/external/register_format.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ from typing import List
1212
class Array:
1313
numbers: List[int]
1414
```
15-
15+
[](){#array-example}
1616
<!-- inline-snapshot-lib: conftest.py -->
1717
``` python title="conftest.py"
1818
from pathlib import Path
@@ -69,7 +69,7 @@ def test_array():
6969

7070
### Report
7171

72-
inline-snapshot needs to know how changes in your external files should be displayed. `TextDiff` and `BinaryDiff` can be used as mixin classes (see the example in [custom formats](#custom-formats)) to provide generic representations for text or binary formats, but you can also define custom functions for your files.
72+
inline-snapshot needs to know how changes in your external files should be displayed. `TextDiff` and `BinaryDiff` can be used as mixin classes (see the `Array` example (above)[#array-example]) to provide generic representations for text or binary formats, but you can also define custom functions for your files.
7373

7474
* `rich_diff()` is used every time the external snapshot value is changed and should show the difference between the original and new versions in a human-readable form.
7575
* `rich_show()` is used every time an external snapshot is created and should show a human-readable form of the initial value.

src/inline_snapshot/_external/_format/_protocol.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,7 @@ class MyFormat: ...
214214
replace_handler: If `True`, replaces an existing handler for the same suffix.
215215
216216
Raises:
217-
UsageError: If a handler for the same suffix already exists and
218-
`replace_handler` is not set to `True`.
217+
UsageError: If a handler for the same suffix already exists and `replace_handler` is not set to `True`.
219218
"""
220219
if format is None:
221220
return partial(register_format, replace_handler=replace_handler)

0 commit comments

Comments
 (0)