Insert `from __future__ import annotations`

This commit is contained in:
Adam Turner
2022-12-30 20:14:18 +00:00
parent 0b1efd7756
commit f4c8a0a68e
180 changed files with 366 additions and 6 deletions

View File

@@ -1,3 +1,5 @@
from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:

View File

@@ -1,7 +1,7 @@
import enum
from io import StringIO
from sphinx.util import save_traceback
from ._functions_to_import import function_to_be_imported
__all__ = ['Class']

View File

@@ -0,0 +1,8 @@
from typing import TYPE_CHECKING, Optional
if TYPE_CHECKING:
from sphinx.application import Sphinx
def function_to_be_imported(app: Optional["Sphinx"]) -> str:
"""docstring"""

View File

@@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Annotated

View File

@@ -1,3 +1,5 @@
from __future__ import annotations
from inspect import Parameter, Signature
from typing import List, Union

View File

@@ -1,3 +1,5 @@
from __future__ import annotations
import typing
from typing import final

View File

@@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Generic, TypeVar
T = TypeVar('T')

View File

@@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Callable, List
#: A list of int

View File

@@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Any, overload

View File

@@ -1,3 +1,5 @@
from __future__ import annotations
from datetime import datetime
from typing import Any

View File

@@ -1,3 +1,5 @@
from __future__ import annotations
import pathlib
from typing import Any, Tuple, TypeVar, Union

View File

@@ -1,3 +1,5 @@
from __future__ import annotations
from datetime import date
from typing import NewType, TypeVar

View File

@@ -1,3 +1,5 @@
from __future__ import annotations
from contextlib import contextmanager
from functools import lru_cache
from typing import Generator

View File

@@ -1,3 +1,5 @@
from __future__ import annotations
from os import path
from typing import Union