summaryrefslogtreecommitdiff
path: root/sphinx/transforms
diff options
context:
space:
mode:
authorAdam Turner <9087854+aa-turner@users.noreply.github.com>2022-12-30 20:14:18 +0000
committerAdam Turner <9087854+aa-turner@users.noreply.github.com>2023-01-01 20:48:37 +0000
commitf4c8a0a68e0013808d169357c9f77ebdf19d0f4e (patch)
treef952fa0106f7b93db5b5a21b801f12566f2ebaee /sphinx/transforms
parent0b1efd7756e05b238c28c62e3946a222cacbd229 (diff)
downloadsphinx-git-f4c8a0a68e0013808d169357c9f77ebdf19d0f4e.tar.gz
Insert ``from __future__ import annotations``
Diffstat (limited to 'sphinx/transforms')
-rw-r--r--sphinx/transforms/__init__.py2
-rw-r--r--sphinx/transforms/compact_bullet_list.py2
-rw-r--r--sphinx/transforms/i18n.py2
-rw-r--r--sphinx/transforms/post_transforms/__init__.py2
-rw-r--r--sphinx/transforms/post_transforms/code.py2
-rw-r--r--sphinx/transforms/post_transforms/images.py2
-rw-r--r--sphinx/transforms/references.py2
7 files changed, 14 insertions, 0 deletions
diff --git a/sphinx/transforms/__init__.py b/sphinx/transforms/__init__.py
index fdffa0f7c..3bdd915f9 100644
--- a/sphinx/transforms/__init__.py
+++ b/sphinx/transforms/__init__.py
@@ -1,5 +1,7 @@
"""Docutils transforms used by Sphinx when reading documents."""
+from __future__ import annotations
+
import re
import unicodedata
from typing import TYPE_CHECKING, Any, Dict, Generator, List, Optional, Tuple, cast
diff --git a/sphinx/transforms/compact_bullet_list.py b/sphinx/transforms/compact_bullet_list.py
index 4bf633237..449c875c0 100644
--- a/sphinx/transforms/compact_bullet_list.py
+++ b/sphinx/transforms/compact_bullet_list.py
@@ -1,5 +1,7 @@
"""Docutils transforms used by Sphinx when reading documents."""
+from __future__ import annotations
+
from typing import Any, Dict, List, cast
from docutils import nodes
diff --git a/sphinx/transforms/i18n.py b/sphinx/transforms/i18n.py
index 552aa955f..5f226683f 100644
--- a/sphinx/transforms/i18n.py
+++ b/sphinx/transforms/i18n.py
@@ -1,5 +1,7 @@
"""Docutils transforms used by Sphinx when reading documents."""
+from __future__ import annotations
+
from os import path
from re import DOTALL, match
from textwrap import indent
diff --git a/sphinx/transforms/post_transforms/__init__.py b/sphinx/transforms/post_transforms/__init__.py
index 10c5a2744..e3a27bd6d 100644
--- a/sphinx/transforms/post_transforms/__init__.py
+++ b/sphinx/transforms/post_transforms/__init__.py
@@ -1,5 +1,7 @@
"""Docutils transforms used by Sphinx."""
+from __future__ import annotations
+
import re
from typing import Any, Dict, List, Optional, Sequence, Tuple, Type, cast
diff --git a/sphinx/transforms/post_transforms/code.py b/sphinx/transforms/post_transforms/code.py
index 5a5980c4a..0308b2224 100644
--- a/sphinx/transforms/post_transforms/code.py
+++ b/sphinx/transforms/post_transforms/code.py
@@ -1,5 +1,7 @@
"""transforms for code-blocks."""
+from __future__ import annotations
+
import sys
from typing import Any, Dict, List, NamedTuple
diff --git a/sphinx/transforms/post_transforms/images.py b/sphinx/transforms/post_transforms/images.py
index 1b9e901ff..0910b6b37 100644
--- a/sphinx/transforms/post_transforms/images.py
+++ b/sphinx/transforms/post_transforms/images.py
@@ -1,5 +1,7 @@
"""Docutils transforms used by Sphinx."""
+from __future__ import annotations
+
import os
import re
from math import ceil
diff --git a/sphinx/transforms/references.py b/sphinx/transforms/references.py
index 647c83e12..0d520e026 100644
--- a/sphinx/transforms/references.py
+++ b/sphinx/transforms/references.py
@@ -1,5 +1,7 @@
"""Docutils transforms used by Sphinx."""
+from __future__ import annotations
+
from typing import TYPE_CHECKING, Any, Dict
from docutils.transforms.references import DanglingReferences