Skip to content

Commit

Permalink
chore(typing): silence pyright warning
Browse files Browse the repository at this point in the history
  • Loading branch information
dangotbanned committed Feb 6, 2025
1 parent fbba2a5 commit 23bcdde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sphinxext/code_ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import TYPE_CHECKING, Literal, get_args
from typing import TYPE_CHECKING, Literal, cast, get_args

from docutils import nodes
from docutils.parsers.rst import directives
Expand Down Expand Up @@ -52,7 +52,7 @@ def validate_output(output: Any) -> _OutputLong:
msg = f":output: option must be one of {get_args(_OutputShort)!r}"
raise TypeError(msg)
else:
short: _OutputShort = output
short = cast("_OutputShort", output)
return _OUTPUT_REMAP[short]


Expand Down

0 comments on commit 23bcdde

Please sign in to comment.