Skip to content

Commit

Permalink
Placate mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Apr 17, 2024
1 parent 96e2f36 commit 0d1e41f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sphinx/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,8 +532,10 @@ def _validate_valid_types(
return ()
if isinstance(valid_types, (frozenset, ENUM)):
return valid_types
if isinstance(valid_types, type) or valid_types is Any:
if isinstance(valid_types, type):
return frozenset((valid_types,))
if valid_types is Any:
return frozenset({Any}) # type: ignore[arg-type]
if isinstance(valid_types, set):
return frozenset(valid_types)
if not isinstance(valid_types, tuple):
Expand Down

0 comments on commit 0d1e41f

Please sign in to comment.