Skip to content

Commit 1a0db7d

Browse files
committed
Fix missing __future__ import for Python 3.8
1 parent 1d1aa29 commit 1a0db7d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

autoapi/extension.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
This extension allows you to automagically generate API documentation from your project.
44
"""
55

6+
from __future__ import annotations
7+
68
import os
79
import shutil
8-
from typing import Dict, Tuple
910

1011
import sphinx
1112
from sphinx.util.console import colorize
@@ -40,7 +41,7 @@
4041
"method",
4142
"attribute",
4243
]
43-
_VIEWCODE_CACHE: Dict[str, tuple[str, dict[str, tuple[str, int, int]]]] = {}
44+
_VIEWCODE_CACHE: dict[str, tuple[str, dict[str, tuple[str, int, int]]]] = {}
4445
"""Caches a module's parse results for use in viewcode."""
4546

4647

tests/python/py3example/example/example.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ def __len__(self):
189189

190190
class InheritBaseError(Exception):
191191
"""The base exception."""
192+
192193
def __init__(self):
193194
self.my_message = "one"
194195
"""My message."""
@@ -197,6 +198,7 @@ def __init__(self):
197198

198199
class InheritError(InheritBaseError):
199200
"""The middle exception."""
201+
200202
def __init__(self):
201203
self.my_other_message = "two"
202204
"""My other message."""
@@ -209,6 +211,7 @@ class SubInheritError(InheritError):
209211

210212
class DuplicateInheritError(InheritBaseError):
211213
"""Not the base exception."""
214+
212215
def __init__(self):
213216
self.my_message = "three"
214217
super().__init__()

0 commit comments

Comments
 (0)