Skip to content

Conversation

@ianw
Copy link

@ianw ianw commented Nov 28, 2025

Currently this displays a BeforeValidator annotation as the str() (e.g. "<foo at 0x12345>") which is not helpful. Check if this
validator is a function, and if so mark it with :py:func. Similarly, try to present something sane for the json_schema_input_type.

A test-case is added

Depends-On: #329

before:
Screenshot From 2025-11-28 15-15-51

after:
Screenshot From 2025-11-28 15-18-59

ianw added 2 commits November 28, 2025 14:32
This test started failing with [1].  These annotations are somewhat of
a duplicate of the constraints; one thought is that you could just
parse out the first item of the Annotation - but that might cause more
problems than it solves.

Fix the testing so it works, but just skip this if somehow we have a
lower sphinx to avoid bumping the base requirement.

[1] sphinx-doc/sphinx@159c267
Currently this displays a BeforeValidator annotation as the str()
(e.g. "<foo at 0x12345>") which is not helpful.  Check if this
validator is a function, and if so mark it with :py:func.  Similarly,
try to present something sane for the json_schema_input_type.

A test-case is added

Depends-On: mansenfranzen#329
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.

1 participant