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 enum import IntEnum from enum import IntEnum
from typing import Any, Optional from typing import Any, Optional

View File

@ -1,5 +1,7 @@
"""Document tree nodes that Sphinx defines on top of those in Docutils.""" """Document tree nodes that Sphinx defines on top of those in Docutils."""
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Sequence from typing import TYPE_CHECKING, Any, Dict, List, Optional, Sequence
from docutils import nodes from docutils import nodes

View File

@ -3,6 +3,8 @@
Gracefully adapted from the TextPress system by Armin. Gracefully adapted from the TextPress system by Armin.
""" """
from __future__ import annotations
import os import os
import pickle import pickle
import sys import sys

View File

@ -1,5 +1,7 @@
"""Builder superclass for all builders.""" """Builder superclass for all builders."""
from __future__ import annotations
import codecs import codecs
import pickle import pickle
import time import time

View File

@ -1,5 +1,7 @@
"""Base class of epub2/epub3 builders.""" """Base class of epub2/epub3 builders."""
from __future__ import annotations
import html import html
import os import os
import re import re

View File

@ -1,5 +1,7 @@
"""Changelog builder.""" """Changelog builder."""
from __future__ import annotations
import html import html
from os import path from os import path
from typing import Any, Dict, List, Tuple, cast from typing import Any, Dict, List, Tuple, cast

View File

@ -1,5 +1,7 @@
"""Directory HTML builders.""" """Directory HTML builders."""
from __future__ import annotations
from os import path from os import path
from typing import Any, Dict, Optional from typing import Any, Dict, Optional

View File

@ -1,5 +1,7 @@
"""Do syntax checks, but no writing.""" """Do syntax checks, but no writing."""
from __future__ import annotations
from typing import Any, Dict, Optional, Set from typing import Any, Dict, Optional, Set
from docutils.nodes import Node from docutils.nodes import Node

View File

@ -3,6 +3,8 @@
Originally derived from epub.py. Originally derived from epub.py.
""" """
from __future__ import annotations
import html import html
from os import path from os import path
from typing import Any, Dict, List, NamedTuple, Set, Tuple from typing import Any, Dict, List, NamedTuple, Set, Tuple

View File

@ -1,5 +1,7 @@
"""The MessageCatalogBuilder class.""" """The MessageCatalogBuilder class."""
from __future__ import annotations
from codecs import open from codecs import open
from collections import OrderedDict, defaultdict from collections import OrderedDict, defaultdict
from datetime import datetime, timedelta, tzinfo from datetime import datetime, timedelta, tzinfo

View File

@ -1,5 +1,7 @@
"""Several HTML builders.""" """Several HTML builders."""
from __future__ import annotations
import html import html
import os import os
import posixpath import posixpath

View File

@ -1,5 +1,7 @@
"""Transforms for HTML builder.""" """Transforms for HTML builder."""
from __future__ import annotations
import re import re
from typing import Any, Dict, List from typing import Any, Dict, List

View File

@ -1,5 +1,7 @@
"""LaTeX builder.""" """LaTeX builder."""
from __future__ import annotations
import os import os
import warnings import warnings
from os import path from os import path

View File

@ -1,5 +1,7 @@
"""consntants for LaTeX builder.""" """consntants for LaTeX builder."""
from __future__ import annotations
from typing import Any, Dict from typing import Any, Dict
PDFLATEX_DEFAULT_FONTPKG = r''' PDFLATEX_DEFAULT_FONTPKG = r'''

View File

@ -1,5 +1,7 @@
"""Theming support for LaTeX builder.""" """Theming support for LaTeX builder."""
from __future__ import annotations
import configparser import configparser
from os import path from os import path
from typing import Dict, Optional from typing import Dict, Optional

View File

@ -1,5 +1,7 @@
"""Transforms for LaTeX builder.""" """Transforms for LaTeX builder."""
from __future__ import annotations
from typing import Any, Dict, List, Optional, Set, Tuple, cast from typing import Any, Dict, List, Optional, Set, Tuple, cast
from docutils import nodes from docutils import nodes

View File

@ -1,5 +1,7 @@
"""Utilities for LaTeX builder.""" """Utilities for LaTeX builder."""
from __future__ import annotations
from typing import Optional from typing import Optional
from docutils.writers.latex2e import Babel from docutils.writers.latex2e import Babel

View File

@ -1,5 +1,7 @@
"""The CheckExternalLinksBuilder class.""" """The CheckExternalLinksBuilder class."""
from __future__ import annotations
import json import json
import re import re
import socket import socket

View File

@ -1,5 +1,7 @@
"""Manual pages builder.""" """Manual pages builder."""
from __future__ import annotations
import warnings import warnings
from os import path from os import path
from typing import Any, Dict, List, Optional, Set, Tuple, Union from typing import Any, Dict, List, Optional, Set, Tuple, Union

View File

@ -1,5 +1,7 @@
"""Single HTML builders.""" """Single HTML builders."""
from __future__ import annotations
from os import path from os import path
from typing import Any, Dict, List, Optional, Tuple, Union from typing import Any, Dict, List, Optional, Tuple, Union

View File

@ -1,5 +1,7 @@
"""Texinfo builder.""" """Texinfo builder."""
from __future__ import annotations
import os import os
import warnings import warnings
from os import path from os import path

View File

@ -1,5 +1,7 @@
"""Plain-text Sphinx builder.""" """Plain-text Sphinx builder."""
from __future__ import annotations
from os import path from os import path
from typing import Any, Dict, Iterator, Optional, Set, Tuple from typing import Any, Dict, Iterator, Optional, Set, Tuple

View File

@ -1,5 +1,7 @@
"""Docutils-native XML and pseudo-XML builders.""" """Docutils-native XML and pseudo-XML builders."""
from __future__ import annotations
from os import path from os import path
from typing import Any, Dict, Iterator, Optional, Set, Type, Union from typing import Any, Dict, Iterator, Optional, Set, Type, Union

View File

@ -1,5 +1,7 @@
"""Build documentation from a provided source.""" """Build documentation from a provided source."""
from __future__ import annotations
import argparse import argparse
import bdb import bdb
import locale import locale

View File

@ -7,6 +7,8 @@ This is in its own module so that importing it is fast. It should not
import the main Sphinx modules (like sphinx.applications, sphinx.builders). import the main Sphinx modules (like sphinx.applications, sphinx.builders).
""" """
from __future__ import annotations
import os import os
import subprocess import subprocess
import sys import sys

View File

@ -1,5 +1,7 @@
"""Quickly setup documentation source to work with Sphinx.""" """Quickly setup documentation source to work with Sphinx."""
from __future__ import annotations
import argparse import argparse
import locale import locale
import os import os

View File

@ -1,5 +1,7 @@
"""Build configuration file handling.""" """Build configuration file handling."""
from __future__ import annotations
import re import re
import traceback import traceback
import types import types

View File

@ -1,5 +1,7 @@
"""Sphinx deprecation classes and utilities.""" """Sphinx deprecation classes and utilities."""
from __future__ import annotations
import sys import sys
import warnings import warnings
from importlib import import_module from importlib import import_module

View File

@ -1,5 +1,7 @@
"""Handlers for additional ReST directives.""" """Handlers for additional ReST directives."""
from __future__ import annotations
import re import re
from typing import TYPE_CHECKING, Any, Dict, Generic, List, Optional, Tuple, TypeVar, cast from typing import TYPE_CHECKING, Any, Dict, Generic, List, Optional, Tuple, TypeVar, cast

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import sys import sys
import textwrap import textwrap
from difflib import unified_diff from difflib import unified_diff

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import re import re
from typing import TYPE_CHECKING, Any, Dict, List, cast from typing import TYPE_CHECKING, Any, Dict, List, cast

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import os import os
from os import path from os import path
from typing import TYPE_CHECKING, Any, Dict, List, cast from typing import TYPE_CHECKING, Any, Dict, List, cast

View File

@ -4,6 +4,8 @@ Domains are groupings of description directives
and roles describing e.g. constructs of one programming language. and roles describing e.g. constructs of one programming language.
""" """
from __future__ import annotations
import copy import copy
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
from typing import (TYPE_CHECKING, Any, Callable, Dict, Iterable, List, NamedTuple, Optional, from typing import (TYPE_CHECKING, Any, Callable, Dict, Iterable, List, NamedTuple, Optional,

View File

@ -1,5 +1,7 @@
"""The C language domain.""" """The C language domain."""
from __future__ import annotations
import re import re
from typing import (Any, Callable, Dict, Generator, Iterator, List, Optional, Tuple, TypeVar, from typing import (Any, Callable, Dict, Generator, Iterator, List, Optional, Tuple, TypeVar,
Union, cast) Union, cast)

View File

@ -1,5 +1,7 @@
"""The changeset domain.""" """The changeset domain."""
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, List, NamedTuple, cast from typing import TYPE_CHECKING, Any, Dict, List, NamedTuple, cast
from docutils import nodes from docutils import nodes

View File

@ -1,5 +1,7 @@
"""The citation domain.""" """The citation domain."""
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Set, Tuple, cast from typing import TYPE_CHECKING, Any, Dict, List, Optional, Set, Tuple, cast
from docutils import nodes from docutils import nodes

View File

@ -1,5 +1,7 @@
"""The C++ language domain.""" """The C++ language domain."""
from __future__ import annotations
import re import re
from typing import (Any, Callable, Dict, Generator, Iterator, List, Optional, Tuple, TypeVar, from typing import (Any, Callable, Dict, Generator, Iterator, List, Optional, Tuple, TypeVar,
Union) Union)

View File

@ -1,5 +1,7 @@
"""The index domain.""" """The index domain."""
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Tuple from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Tuple
from docutils import nodes from docutils import nodes

View File

@ -1,5 +1,7 @@
"""The JavaScript domain.""" """The JavaScript domain."""
from __future__ import annotations
from typing import Any, Dict, Iterator, List, Optional, Tuple, cast from typing import Any, Dict, Iterator, List, Optional, Tuple, cast
from docutils import nodes from docutils import nodes

View File

@ -1,5 +1,7 @@
"""The math domain.""" """The math domain."""
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Tuple from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Tuple
from docutils import nodes from docutils import nodes

View File

@ -1,5 +1,7 @@
"""The Python domain.""" """The Python domain."""
from __future__ import annotations
import ast import ast
import builtins import builtins
import inspect import inspect

View File

@ -1,5 +1,7 @@
"""The reStructuredText domain.""" """The reStructuredText domain."""
from __future__ import annotations
import re import re
from typing import Any, Dict, Iterator, List, Optional, Tuple, cast from typing import Any, Dict, Iterator, List, Optional, Tuple, cast

View File

@ -1,5 +1,7 @@
"""The standard domain.""" """The standard domain."""
from __future__ import annotations
import re import re
from copy import copy from copy import copy
from typing import (TYPE_CHECKING, Any, Callable, Dict, Final, Iterable, Iterator, List, from typing import (TYPE_CHECKING, Any, Callable, Dict, Final, Iterable, Iterator, List,

View File

@ -1,5 +1,7 @@
"""Global creation environment.""" """Global creation environment."""
from __future__ import annotations
import os import os
import pickle import pickle
from collections import defaultdict from collections import defaultdict

View File

@ -1,5 +1,7 @@
"""Index entries adapters for sphinx.environment.""" """Index entries adapters for sphinx.environment."""
from __future__ import annotations
import re import re
import unicodedata import unicodedata
from itertools import groupby from itertools import groupby

View File

@ -1,5 +1,7 @@
"""Toctree adapter for sphinx.environment.""" """Toctree adapter for sphinx.environment."""
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Tuple, cast from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Tuple, cast
from docutils import nodes from docutils import nodes

View File

@ -1,5 +1,7 @@
"""The data collector components for sphinx.environment.""" """The data collector components for sphinx.environment."""
from __future__ import annotations
from typing import TYPE_CHECKING, Dict, List, Optional, Set from typing import TYPE_CHECKING, Dict, List, Optional, Set
from docutils import nodes from docutils import nodes

View File

@ -1,5 +1,7 @@
"""The image collector for sphinx.environment.""" """The image collector for sphinx.environment."""
from __future__ import annotations
import os import os
from glob import glob from glob import glob
from os import path from os import path

View File

@ -1,5 +1,7 @@
"""The dependencies collector components for sphinx.environment.""" """The dependencies collector components for sphinx.environment."""
from __future__ import annotations
import os import os
from os import path from os import path
from typing import Any, Dict, Set from typing import Any, Dict, Set

View File

@ -1,5 +1,7 @@
"""The metadata collector components for sphinx.environment.""" """The metadata collector components for sphinx.environment."""
from __future__ import annotations
from typing import Any, Dict, List, Set, cast from typing import Any, Dict, List, Set, cast
from docutils import nodes from docutils import nodes

View File

@ -1,5 +1,7 @@
"""The title collector components for sphinx.environment.""" """The title collector components for sphinx.environment."""
from __future__ import annotations
from typing import Any, Dict, Set from typing import Any, Dict, Set
from docutils import nodes from docutils import nodes

View File

@ -1,5 +1,7 @@
"""Toctree collector for sphinx.environment.""" """Toctree collector for sphinx.environment."""
from __future__ import annotations
from typing import Any, Dict, List, Optional, Sequence, Set, Tuple, TypeVar, Union, cast from typing import Any, Dict, List, Optional, Sequence, Set, Tuple, TypeVar, Union, cast
from docutils import nodes from docutils import nodes

View File

@ -1,5 +1,7 @@
"""Contains SphinxError and a few subclasses.""" """Contains SphinxError and a few subclasses."""
from __future__ import annotations
from typing import Any, Optional from typing import Any, Optional

View File

@ -3,6 +3,8 @@
Gracefully adapted from the TextPress system by Armin. Gracefully adapted from the TextPress system by Armin.
""" """
from __future__ import annotations
from collections import defaultdict from collections import defaultdict
from operator import attrgetter from operator import attrgetter
from typing import TYPE_CHECKING, Any, Callable, Dict, List, NamedTuple, Tuple, Type from typing import TYPE_CHECKING, Any, Callable, Dict, List, NamedTuple, Tuple, Type

View File

@ -9,6 +9,8 @@ Copyright 2008 Société des arts technologiques (SAT),
https://sat.qc.ca/ https://sat.qc.ca/
""" """
from __future__ import annotations
import argparse import argparse
import glob import glob
import locale import locale

View File

@ -5,6 +5,8 @@ the doctree, thus avoiding duplication between docstrings and documentation
for those who like elaborate docstrings. for those who like elaborate docstrings.
""" """
from __future__ import annotations
import re import re
from inspect import Parameter, Signature from inspect import Parameter, Signature
from types import ModuleType from types import ModuleType

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Any, Callable, Dict, List, Optional, Set, Type from typing import Any, Callable, Dict, List, Optional, Set, Type
from docutils import nodes from docutils import nodes

View File

@ -1,5 +1,7 @@
"""Importer utilities for autodoc""" """Importer utilities for autodoc"""
from __future__ import annotations
import importlib import importlib
import traceback import traceback
import warnings import warnings

View File

@ -1,5 +1,7 @@
"""mock for autodoc""" """mock for autodoc"""
from __future__ import annotations
import contextlib import contextlib
import os import os
import sys import sys

View File

@ -4,6 +4,8 @@ Preserve the default argument values of function signatures in source code
and keep them not evaluated for readability. and keep them not evaluated for readability.
""" """
from __future__ import annotations
import ast import ast
import inspect import inspect
from typing import Any, Dict, List, Optional from typing import Any, Dict, List, Optional

View File

@ -1,5 +1,7 @@
"""Update annotations info of living objects using type_comments.""" """Update annotations info of living objects using type_comments."""
from __future__ import annotations
import ast import ast
from inspect import Parameter, Signature, getsource from inspect import Parameter, Signature, getsource
from typing import Any, Dict, List, Optional, cast from typing import Any, Dict, List, Optional, cast

View File

@ -1,5 +1,7 @@
"""Generating content for autodoc using typehints""" """Generating content for autodoc using typehints"""
from __future__ import annotations
import re import re
from collections import OrderedDict from collections import OrderedDict
from typing import Any, Dict, Iterable, Set, cast from typing import Any, Dict, Iterable, Set, cast

View File

@ -1,5 +1,7 @@
"""Allow reference sections by :ref: role using its title.""" """Allow reference sections by :ref: role using its title."""
from __future__ import annotations
from typing import Any, Dict, cast from typing import Any, Dict, cast
from docutils import nodes from docutils import nodes

View File

@ -46,6 +46,8 @@ resolved to a Python object, and otherwise it becomes simple emphasis.
This can be used as the default role to make links 'smart'. This can be used as the default role to make links 'smart'.
""" """
from __future__ import annotations
import inspect import inspect
import os import os
import posixpath import posixpath

View File

@ -12,6 +12,8 @@ Example Makefile rule::
sphinx-autogen -o source/generated source/*.rst sphinx-autogen -o source/generated source/*.rst
""" """
from __future__ import annotations
import argparse import argparse
import inspect import inspect
import locale import locale

View File

@ -4,6 +4,8 @@ Mostly written by Josip Dzolonga for the Google Highly Open Participation
contest. contest.
""" """
from __future__ import annotations
import glob import glob
import inspect import inspect
import pickle import pickle

View File

@ -3,6 +3,8 @@
The extension automatically execute code snippets and checks their results. The extension automatically execute code snippets and checks their results.
""" """
from __future__ import annotations
import doctest import doctest
import re import re
import sys import sys

View File

@ -1,5 +1,7 @@
"""Measure durations of Sphinx processing.""" """Measure durations of Sphinx processing."""
from __future__ import annotations
from datetime import datetime, timedelta from datetime import datetime, timedelta
from itertools import islice from itertools import islice
from operator import itemgetter from operator import itemgetter

View File

@ -17,6 +17,8 @@ You can also give an explicit caption, e.g. :exmpl:`Foo <foo>`.
Both, the url string and the caption string must escape ``%`` as ``%%``. Both, the url string and the caption string must escape ``%`` as ``%%``.
""" """
from __future__ import annotations
import re import re
from typing import Any, Dict, List, Tuple from typing import Any, Dict, List, Tuple

View File

@ -1,5 +1,7 @@
"""To publish HTML docs at GitHub Pages, create .nojekyll file.""" """To publish HTML docs at GitHub Pages, create .nojekyll file."""
from __future__ import annotations
import os import os
import urllib import urllib
from typing import Any, Dict from typing import Any, Dict

View File

@ -1,6 +1,8 @@
"""Allow graphviz-formatted graphs to be included inline in generated documents. """Allow graphviz-formatted graphs to be included inline in generated documents.
""" """
from __future__ import annotations
import posixpath import posixpath
import re import re
import subprocess import subprocess

View File

@ -14,6 +14,8 @@ namespace of the project configuration (that is, all variables from
``conf.py`` are available.) ``conf.py`` are available.)
""" """
from __future__ import annotations
from typing import Any, Dict, List from typing import Any, Dict, List
from docutils import nodes from docutils import nodes

View File

@ -1,5 +1,7 @@
"""Image converter extension for Sphinx""" """Image converter extension for Sphinx"""
from __future__ import annotations
import subprocess import subprocess
import sys import sys
from subprocess import CalledProcessError from subprocess import CalledProcessError

View File

@ -1,5 +1,7 @@
"""Render math in HTML via dvipng or dvisvgm.""" """Render math in HTML via dvipng or dvisvgm."""
from __future__ import annotations
import base64 import base64
import re import re
import shutil import shutil

View File

@ -28,6 +28,8 @@ The graph is inserted as a PNG+image map into HTML and a PDF in
LaTeX. LaTeX.
""" """
from __future__ import annotations
import builtins import builtins
import inspect import inspect
import re import re

View File

@ -16,6 +16,8 @@ This works as follows:
without Internet access. without Internet access.
""" """
from __future__ import annotations
import concurrent.futures import concurrent.futures
import functools import functools
import posixpath import posixpath

View File

@ -1,5 +1,7 @@
"""Add external links to module code in Python object descriptions.""" """Add external links to module code in Python object descriptions."""
from __future__ import annotations
from typing import Any, Dict, Set from typing import Any, Dict, Set
from docutils import nodes from docutils import nodes

View File

@ -5,6 +5,8 @@ This requires the MathJax JavaScript library on your webserver/computer.
.. _MathJax: https://www.mathjax.org/ .. _MathJax: https://www.mathjax.org/
""" """
from __future__ import annotations
import json import json
from typing import Any, Dict, cast from typing import Any, Dict, cast

View File

@ -1,5 +1,7 @@
"""Support for NumPy and Google style docstrings.""" """Support for NumPy and Google style docstrings."""
from __future__ import annotations
from typing import Any, Dict, List from typing import Any, Dict, List
import sphinx import sphinx

View File

@ -1,5 +1,7 @@
"""Classes for docstring parsing and formatting.""" """Classes for docstring parsing and formatting."""
from __future__ import annotations
import collections import collections
import inspect import inspect
import re import re

View File

@ -1,5 +1,7 @@
"""A collection of helpful iterators.""" """A collection of helpful iterators."""
from __future__ import annotations
import collections import collections
import warnings import warnings
from typing import Any, Iterable, Optional from typing import Any, Iterable, Optional

View File

@ -5,6 +5,8 @@ The todolist directive collects all todos of your project and lists them along
with a backlink to the original location. with a backlink to the original location.
""" """
from __future__ import annotations
from typing import Any, Dict, List, cast from typing import Any, Dict, List, cast
from docutils import nodes from docutils import nodes

View File

@ -1,5 +1,7 @@
"""Add links to module code in Python object descriptions.""" """Add links to module code in Python object descriptions."""
from __future__ import annotations
import posixpath import posixpath
import traceback import traceback
from os import path from os import path

View File

@ -1,5 +1,7 @@
"""Utilities for Sphinx extensions.""" """Utilities for Sphinx extensions."""
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict from typing import TYPE_CHECKING, Any, Dict
from packaging.version import InvalidVersion, Version from packaging.version import InvalidVersion, Version

View File

@ -1,5 +1,7 @@
"""Highlight code blocks using Pygments.""" """Highlight code blocks using Pygments."""
from __future__ import annotations
from functools import partial from functools import partial
from importlib import import_module from importlib import import_module
from typing import Any, Dict, Optional, Type, Union from typing import Any, Dict, Optional, Type, Union

View File

@ -1,4 +1,6 @@
"""Input/Output files""" """Input/Output files"""
from __future__ import annotations
import codecs import codecs
import warnings import warnings
from typing import TYPE_CHECKING, Any, List, Type from typing import TYPE_CHECKING, Any, List, Type

View File

@ -1,5 +1,7 @@
"""Glue code for the jinja2 templating engine.""" """Glue code for the jinja2 templating engine."""
from __future__ import annotations
import pathlib import pathlib
from os import path from os import path
from pprint import pformat from pprint import pformat

View File

@ -1,5 +1,7 @@
"""A Base class for additional parsers.""" """A Base class for additional parsers."""
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, List, Type, Union from typing import TYPE_CHECKING, Any, Dict, List, Type, Union
import docutils.parsers import docutils.parsers

View File

@ -1,5 +1,7 @@
"""Utility function and classes for Sphinx projects.""" """Utility function and classes for Sphinx projects."""
from __future__ import annotations
import os import os
from glob import glob from glob import glob
from typing import Dict, Iterable, Optional, Set from typing import Dict, Iterable, Optional, Set

View File

@ -1,5 +1,7 @@
"""Utilities parsing and analyzing Python code.""" """Utilities parsing and analyzing Python code."""
from __future__ import annotations
import re import re
import tokenize import tokenize
from collections import OrderedDict from collections import OrderedDict

View File

@ -1,5 +1,7 @@
"""Helpers for AST (Abstract Syntax Tree).""" """Helpers for AST (Abstract Syntax Tree)."""
from __future__ import annotations
import ast import ast
import warnings import warnings
from typing import Dict, List, Optional, Type, overload from typing import Dict, List, Optional, Type, overload

View File

@ -1,5 +1,7 @@
"""Utilities parsing and analyzing Python code.""" """Utilities parsing and analyzing Python code."""
from __future__ import annotations
import ast import ast
import inspect import inspect
import itertools import itertools

View File

@ -1,5 +1,7 @@
"""Sphinx component registry.""" """Sphinx component registry."""
from __future__ import annotations
import traceback import traceback
import warnings import warnings
from importlib import import_module from importlib import import_module

View File

@ -1,5 +1,7 @@
"""Handlers for additional ReST roles.""" """Handlers for additional ReST roles."""
from __future__ import annotations
import re import re
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Type from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Type

View File

@ -1,4 +1,6 @@
"""Create a full-text search index for offline search.""" """Create a full-text search index for offline search."""
from __future__ import annotations
import html import html
import json import json
import pickle import pickle

View File

@ -1,5 +1,7 @@
"""Danish search language: includes the JS Danish stemmer.""" """Danish search language: includes the JS Danish stemmer."""
from __future__ import annotations
from typing import Dict from typing import Dict
import snowballstemmer import snowballstemmer

View File

@ -1,5 +1,7 @@
"""German search language: includes the JS German stemmer.""" """German search language: includes the JS German stemmer."""
from __future__ import annotations
from typing import Dict from typing import Dict
import snowballstemmer import snowballstemmer

View File

@ -1,5 +1,7 @@
"""English search language: includes the JS porter stemmer.""" """English search language: includes the JS porter stemmer."""
from __future__ import annotations
from typing import Dict from typing import Dict
import snowballstemmer import snowballstemmer

View File

@ -1,5 +1,7 @@
"""Spanish search language: includes the JS Spanish stemmer.""" """Spanish search language: includes the JS Spanish stemmer."""
from __future__ import annotations
from typing import Dict from typing import Dict
import snowballstemmer import snowballstemmer

View File

@ -1,5 +1,7 @@
"""Finnish search language: includes the JS Finnish stemmer.""" """Finnish search language: includes the JS Finnish stemmer."""
from __future__ import annotations
from typing import Dict from typing import Dict
import snowballstemmer import snowballstemmer

Some files were not shown because too many files have changed in this diff Show More