Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Apr 24, 2024
1 parent 091f9c0 commit f4d7e6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sphinx/util/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ def stringify_annotation(
and all(getattr(a, '__origin__', ...) is typing.Literal for a in annotation_args)
):
# special case to flatten a Union of Literals into a literal
flattened_args = typing.Literal[annotation_args].__args__ # type: ignore[valid-type]
flattened_args = typing.Literal[annotation_args].__args__ # type: ignore[attr-defined]
args = ', '.join(_format_literal_arg_stringify(a, mode=mode)
for a in flattened_args)
return f'{module_prefix}Literal[{args}]'
Expand Down

0 comments on commit f4d7e6a

Please sign in to comment.