Skip to content

Commit fd696ae

Browse files
committed
Tweak docs and comments [skip ci]
1 parent c4565bd commit fd696ae

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

docs/pointers.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,20 @@ from jsonpath import JSONPointer
5858
example_data = {"foo": {"bar": [1, 2, 3]}, "baz": False}
5959

6060
pointer = JSONPointer("/foo/bar/0")
61-
print(pointer.exists()) # True
61+
print(pointer.exists(example_data)) # True
6262

6363
pointer = JSONPointer("/foo/bar/9")
64-
print(pointer.exists()) # False
64+
print(pointer.exists(example_data)) # False
6565

6666
pointer = JSONPointer("/baz")
67-
print(pointer.exists()) # True
67+
print(pointer.exists(example_data)) # True
6868
```
6969

7070
## `join(*parts)`
7171

7272
**_New in version 0.9.0_**
7373

74-
Join this pointer with _parts_. Each part is expected to be a JSON Pointer string, possibly without a leading slash. If a part does have a leading slash, the previous pointer is ignored and a new `JSONPath` is created, and processing of remaining parts continues.
74+
Join this pointer with _parts_. Each part is expected to be a JSON Pointer string, possibly without a leading slash. If a part does have a leading slash, the previous pointer is ignored and a new `JSONPointer` is created, and processing of remaining parts continues.
7575

7676
`join()` is equivalent to using the slash (`/`) operator for each argument.
7777

jsonpath/patch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ def test(self: Self, path: Union[str, JSONPointer], value: object) -> Self:
501501
Arguments:
502502
path: A string representation of a JSON Pointer, or one that has
503503
already been parsed.
504-
value: The object to add.
504+
value: The object to test.
505505
506506
Returns:
507507
This `JSONPatch` instance, so we can build a JSON Patch by chaining

jsonpath/pointer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def from_match(
257257
match: JSONPathMatch,
258258
) -> JSONPointer:
259259
"""Return a JSON Pointer for the path from a JSONPathMatch instance."""
260-
# A rfc6901 string representation of match.parts.
260+
# An RFC 6901 string representation of match.parts.
261261
if match.parts:
262262
pointer = cls._encode(match.parts)
263263
else:
@@ -403,7 +403,7 @@ def join(self, *parts: str) -> JSONPointer:
403403
404404
Each part is expected to be a JSON Pointer string, possibly without a
405405
leading slash. If a part does have a leading slash, the previous
406-
pointer is ignored and a new `JSONPath` is created, and processing of
406+
pointer is ignored and a new `JSONPointer` is created, and processing of
407407
remaining parts continues.
408408
"""
409409
pointer = self

0 commit comments

Comments
 (0)