Skip to content

Commit 552f098

Browse files
committed
docs: max and min index int
1 parent 22249d1 commit 552f098

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

jsonpath/env.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,21 @@ class attributes `root_token`, `self_token` and `filter_context_token`.
6868
## Class attributes
6969
7070
Attributes:
71-
intersection_token: The pattern used as the intersection operator.
72-
root_token: The pattern used to select the root node in a JSON document.
73-
self_token: The pattern used to select the current node in a JSON document.
74-
union_token: The pattern used as the union operator.
7571
filter_context_token: The pattern used to select extra filter context data.
72+
Defaults to `"#"`.
73+
intersection_token: The pattern used as the intersection operator. Defaults
74+
to `"$"`.
7675
lexer_class: The lexer to use when tokenizing path strings.
76+
max_int_index: The maximum integer allowed when selecting array items by index.
77+
Defaults to `(2**53) - 1`.
78+
min_int_index: The minimum integer allowed when selecting array items by index.
79+
Defaults to `-(2**53) + 1`.
7780
parser_class: The parser to use when parsing tokens from the lexer.
81+
root_token: The pattern used to select the root node in a JSON document.
82+
Defaults to `"$"`.
83+
self_token: The pattern used to select the current node in a JSON document.
84+
Defaults to `"@"`
85+
union_token: The pattern used as the union operator. Defaults to `"|"`.
7886
"""
7987

8088
# These should be unescaped strings. `re.escape` will be called
@@ -85,8 +93,8 @@ class attributes `root_token`, `self_token` and `filter_context_token`.
8593
union_token: str = "|"
8694
filter_context_token: str = "#"
8795

88-
max_int_index = (2**53) - 1
89-
min_int_index = -(2**53) + 1
96+
max_int_index: int = (2**53) - 1
97+
min_int_index: int = -(2**53) + 1
9098

9199
# Override these to customize path tokenization and parsing.
92100
lexer_class: Type[Lexer] = Lexer

0 commit comments

Comments
 (0)