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/testing/util.py | |
parent | f4c8a0a68e0013808d169357c9f77ebdf19d0f4e (diff) | |
download | sphinx-git-26f79b0d2dd88b353ac65623897bdfbe8bc07cab.tar.gz |
Use PEP 595 types
Diffstat (limited to 'sphinx/testing/util.py')
-rw-r--r-- | sphinx/testing/util.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sphinx/testing/util.py b/sphinx/testing/util.py index eb45d42a0..6c5012c26 100644 --- a/sphinx/testing/util.py +++ b/sphinx/testing/util.py @@ -7,7 +7,7 @@ import re import sys import warnings from io import StringIO -from typing import IO, Any, Dict, Generator, List, Optional, Pattern +from typing import IO, Any, Generator, Optional from xml.etree import ElementTree from docutils import nodes @@ -24,12 +24,12 @@ __all__ = [ ] -def assert_re_search(regex: Pattern, text: str, flags: int = 0) -> None: +def assert_re_search(regex: re.Pattern, text: str, flags: int = 0) -> None: if not re.search(regex, text, flags): raise AssertionError('%r did not match %r' % (regex, text)) -def assert_not_re_search(regex: Pattern, text: str, flags: int = 0) -> None: +def assert_not_re_search(regex: re.Pattern, text: str, flags: int = 0) -> None: if re.search(regex, text, flags): raise AssertionError('%r did match %r' % (regex, text)) @@ -102,10 +102,10 @@ class SphinxTestApp(application.Sphinx): srcdir: Optional[path] = None, builddir: Optional[path] = None, freshenv: bool = False, - confoverrides: Optional[Dict] = None, + confoverrides: Optional[dict] = None, status: Optional[IO] = None, warning: Optional[IO] = None, - tags: Optional[List[str]] = None, + tags: Optional[list[str]] = None, docutilsconf: Optional[str] = None, parallel: int = 0 ) -> None: |