Skip to content

Conversation

@sirosen
Copy link
Member

@sirosen sirosen commented Nov 12, 2025

  • Move error formatting into a dedicated module
  • Add a new 'minimal' output mode to describe how we show detail on a
    parse error -- and in theory, other well-known errors
    • Unlike the previous behavior, the 'minimal' format includes
      presentation of the __cause__

As a result, the output on a parse error will now include a one-line
presentation of the underlying error.

Ancillary things:

  • Fix type annotations for the new interface: use Literals
  • Fix type annotations caused by __cause__ handling (use
    BaseException)
  • Fix some changelog formatting

resolves #581

- Move error formatting into a dedicated module
- Add a new 'minimal' output mode to describe how we show detail on a
  parse error -- and in theory, other well-known errors
  - Unlike the previous behavior, the 'minimal' format includes
    presentation of the `__cause__`

As a result, the output on a parse error will now include a one-line
presentation of the underlying error.

Ancillary things:

- Fix type annotations for the new interface: use `Literal`s
- Fix type annotations caused by `__cause__` handling (use
  `BaseException`)
- Fix some changelog formatting

resolves python-jsonschema#581
@sirosen sirosen force-pushed the show-stringified-parse-errors branch from b3d7e4e to 2280a40 Compare November 12, 2025 05:04
@sirosen sirosen merged commit a3a86ef into python-jsonschema:main Nov 12, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Descriptive error for trailing comma in json file

1 participant