diff options
author | Adam Turner <9087854+aa-turner@users.noreply.github.com> | 2023-03-05 18:59:05 +0000 |
---|---|---|
committer | Adam Turner <9087854+aa-turner@users.noreply.github.com> | 2023-03-05 19:03:06 +0000 |
commit | 29d7166af203b33958f7f6c261ae3813e27b32cc (patch) | |
tree | a5fe2f329f5c2db7826b203334ca8093142bc2e3 /sphinx/pycode/parser.py | |
parent | 44326fe2476db44e8c2a60d9326c9c3ac2865c03 (diff) | |
download | sphinx-git-29d7166af203b33958f7f6c261ae3813e27b32cc.tar.gz |
Drop OrderedDict
Since Python 3.7, dicts maintain insertion order.
Diffstat (limited to 'sphinx/pycode/parser.py')
-rw-r--r-- | sphinx/pycode/parser.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sphinx/pycode/parser.py b/sphinx/pycode/parser.py index c3b17c6dd..aecb095b2 100644 --- a/sphinx/pycode/parser.py +++ b/sphinx/pycode/parser.py @@ -7,7 +7,6 @@ import inspect import itertools import re import tokenize -from collections import OrderedDict from inspect import Signature from token import DEDENT, INDENT, NAME, NEWLINE, NUMBER, OP, STRING from tokenize import COMMENT, NL @@ -221,7 +220,7 @@ class VariableCommentPicker(ast.NodeVisitor): self.context: list[str] = [] self.current_classes: list[str] = [] self.current_function: ast.FunctionDef | None = None - self.comments: dict[tuple[str, str], str] = OrderedDict() + self.comments: dict[tuple[str, str], str] = {} self.annotations: dict[tuple[str, str], str] = {} self.previous: ast.AST | None = None self.deforders: dict[str, int] = {} |