Skip to content

Commit

Permalink
Handle cases when Any is not an instance of type
Browse files Browse the repository at this point in the history
This is only needed for Python 3.10 and earlier.
  • Loading branch information
AA-Turner committed Apr 17, 2024
1 parent 4547b49 commit 34c1812
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Release 7.3.4 (in development)
Bugs fixed
----------

* Handle cases when ``Any`` is not an instance of ``type``.
Patch by Adam Turner.

Release 7.3.3 (released Apr 17, 2024)
=====================================
Expand Down
2 changes: 1 addition & 1 deletion sphinx/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ def _validate_valid_types(
return ()
if isinstance(valid_types, (frozenset, ENUM)):
return valid_types
if isinstance(valid_types, type):
if isinstance(valid_types, type) or valid_types is Any:
return frozenset((valid_types,))
if isinstance(valid_types, set):
return frozenset(valid_types)
Expand Down

0 comments on commit 34c1812

Please sign in to comment.