typing: Replace objects from typing with literals

We also replace the use of typing.Union and add missing parameters and
returns types for Callable types.

Change-Id: I75ed4d1cc4d84515910a5bd315f8626135258148
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane
2025-06-04 11:41:40 +01:00
parent c870873f7f
commit e785ab52dc
42 changed files with 476 additions and 472 deletions
+1 -2
View File
@@ -18,7 +18,6 @@ Provides a single directive that can be used to list all extra specs validators
and, thus, document all extra specs that nova recognizes and supports.
"""
import typing as ty
from docutils import nodes
from docutils.parsers import rst
@@ -90,7 +89,7 @@ def _indent(text, count=1):
def _format_validator_group_help(
validators: ty.Dict[str, base.ExtraSpecValidator],
validators: dict[str, base.ExtraSpecValidator],
summary: bool,
):
"""Generate reStructuredText snippets for a group of validators."""