diff options
author | Adam Turner <9087854+aa-turner@users.noreply.github.com> | 2022-12-30 21:13:29 +0000 |
---|---|---|
committer | Adam Turner <9087854+aa-turner@users.noreply.github.com> | 2023-01-01 20:48:38 +0000 |
commit | 26f79b0d2dd88b353ac65623897bdfbe8bc07cab (patch) | |
tree | 0d2f0c752cf1f49a45cde1d7f414d75a6114f1ce /sphinx/writers/html5.py | |
parent | f4c8a0a68e0013808d169357c9f77ebdf19d0f4e (diff) | |
download | sphinx-git-26f79b0d2dd88b353ac65623897bdfbe8bc07cab.tar.gz |
Use PEP 595 types
Diffstat (limited to 'sphinx/writers/html5.py')
-rw-r--r-- | sphinx/writers/html5.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/writers/html5.py b/sphinx/writers/html5.py index 4819be450..bfb2515a5 100644 --- a/sphinx/writers/html5.py +++ b/sphinx/writers/html5.py @@ -6,7 +6,7 @@ import os import posixpath import re import urllib.parse -from typing import TYPE_CHECKING, Iterable, Optional, Set, Tuple, cast +from typing import TYPE_CHECKING, Iterable, Optional, cast from docutils import nodes from docutils.nodes import Element, Node, Text @@ -51,7 +51,7 @@ class HTML5Translator(SphinxTranslator, BaseTranslator): # Override docutils.writers.html5_polyglot:HTMLTranslator # otherwise, nodes like <inline classes="s">...</inline> will be # converted to <s>...</s> by `visit_inline`. - supported_inline_tags: Set[str] = set() + supported_inline_tags: set[str] = set() def __init__(self, document: nodes.document, builder: Builder) -> None: super().__init__(document, builder) @@ -260,7 +260,7 @@ class HTML5Translator(SphinxTranslator, BaseTranslator): def depart_seealso(self, node: Element) -> None: self.depart_admonition(node) - def get_secnumber(self, node: Element) -> Optional[Tuple[int, ...]]: + def get_secnumber(self, node: Element) -> Optional[tuple[int, ...]]: if node.get('secnumber'): return node['secnumber'] |