Skip to content

Fix jsonschema exception str|int containers #7981

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions stubs/jsonschema/jsonschema/exceptions.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class _Error(Exception):
message: str
path: deque[str | int]
relative_path: deque[str | int]
schema_path: deque[str]
relative_schema_path: deque[str]
schema_path: deque[str | int]
relative_schema_path: deque[str | int]
context: list[ValidationError] | None
cause: Exception | None
validator: protocols.Validator | None
Expand All @@ -33,15 +33,15 @@ class _Error(Exception):
validator_value=...,
instance: Any = ...,
schema: Any = ...,
schema_path: Sequence[str] = ...,
schema_path: Sequence[str | int] = ...,
parent: _Error | None = ...,
) -> None: ...
@classmethod
def create_from(cls: type[Self], other: _Error) -> Self: ...
@property
def absolute_path(self) -> Sequence[str | int]: ...
@property
def absolute_schema_path(self) -> Sequence[str]: ...
def absolute_schema_path(self) -> Sequence[str | int]: ...
@property
def json_path(self) -> str: ...
# TODO: this type could be made more precise using TypedDict to
Expand Down