Skip to content

Commit ea16964

Browse files
authored
jsonschema: {relative,absolute}_path can hold ints (#7980)
1 parent c94fb40 commit ea16964

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

stubs/jsonschema/jsonschema/exceptions.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ STRONG_MATCHES: frozenset[str]
1212

1313
class _Error(Exception):
1414
message: str
15-
path: deque[str]
16-
relative_path: deque[str]
15+
path: deque[str | int]
16+
relative_path: deque[str | int]
1717
schema_path: deque[str]
1818
relative_schema_path: deque[str]
1919
context: list[ValidationError] | None
@@ -27,7 +27,7 @@ class _Error(Exception):
2727
self,
2828
message: str,
2929
validator: _utils.Unset | None | protocols.Validator = ...,
30-
path: Sequence[str] = ...,
30+
path: Sequence[str | int] = ...,
3131
cause: Any | None = ...,
3232
context: Sequence[ValidationError] = ...,
3333
validator_value=...,
@@ -39,7 +39,7 @@ class _Error(Exception):
3939
@classmethod
4040
def create_from(cls: type[Self], other: _Error) -> Self: ...
4141
@property
42-
def absolute_path(self) -> Sequence[str]: ...
42+
def absolute_path(self) -> Sequence[str | int]: ...
4343
@property
4444
def absolute_schema_path(self) -> Sequence[str]: ...
4545
@property

0 commit comments

Comments
 (0)