diff options
author | Adam Turner <9087854+aa-turner@users.noreply.github.com> | 2023-01-01 20:43:59 +0000 |
---|---|---|
committer | Adam Turner <9087854+aa-turner@users.noreply.github.com> | 2023-01-01 20:48:39 +0000 |
commit | 14a9289d780240bbce78ad3640e8e1b1b12df43f (patch) | |
tree | fd753f5b0f8c7053923b78c8fef2b90b60f9c7fa /sphinx/builders/texinfo.py | |
parent | 26f79b0d2dd88b353ac65623897bdfbe8bc07cab (diff) | |
download | sphinx-git-14a9289d780240bbce78ad3640e8e1b1b12df43f.tar.gz |
Use PEP 604 types
Diffstat (limited to 'sphinx/builders/texinfo.py')
-rw-r--r-- | sphinx/builders/texinfo.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sphinx/builders/texinfo.py b/sphinx/builders/texinfo.py index d1fd316bf..8fad6ad3c 100644 --- a/sphinx/builders/texinfo.py +++ b/sphinx/builders/texinfo.py @@ -5,7 +5,7 @@ from __future__ import annotations import os import warnings from os import path -from typing import Any, Iterable, Optional, Union +from typing import Any, Iterable from docutils import nodes from docutils.frontend import OptionParser @@ -51,16 +51,16 @@ class TexinfoBuilder(Builder): self.docnames: Iterable[str] = [] self.document_data: list[tuple[str, str, str, str, str, str, str, bool]] = [] - def get_outdated_docs(self) -> Union[str, list[str]]: + def get_outdated_docs(self) -> str | list[str]: return 'all documents' # for now - def get_target_uri(self, docname: str, typ: Optional[str] = None) -> str: + def get_target_uri(self, docname: str, typ: str | None = None) -> str: if docname not in self.docnames: raise NoUri(docname, typ) else: return '%' + docname - def get_relative_uri(self, from_: str, to: str, typ: Optional[str] = None) -> str: + def get_relative_uri(self, from_: str, to: str, typ: str | None = None) -> str: # ignore source path return self.get_target_uri(to, typ) |