summaryrefslogtreecommitdiff
path: root/sphinx/pycode/parser.py
diff options
context:
space:
mode:
authorAdam Turner <9087854+aa-turner@users.noreply.github.com>2023-03-05 18:59:05 +0000
committerAdam Turner <9087854+aa-turner@users.noreply.github.com>2023-03-05 19:03:06 +0000
commit29d7166af203b33958f7f6c261ae3813e27b32cc (patch)
treea5fe2f329f5c2db7826b203334ca8093142bc2e3 /sphinx/pycode/parser.py
parent44326fe2476db44e8c2a60d9326c9c3ac2865c03 (diff)
downloadsphinx-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.py3
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] = {}