From 38a7f14658377203c9c043daadf48641caa94980 Mon Sep 17 00:00:00 2001 From: Saul Shanabrook Date: Sat, 18 May 2019 16:00:05 -0400 Subject: [PATCH] Bound arguments are ordered (#2998) The `arguments` attribute of the `BoundArguments` is specified as an "ordered, mutable mapping (collections.OrderedDict)" not just a mutable mapping: https://docs.python.org/3/library/inspect.html#inspect.BoundArguments.arguments --- stdlib/3/inspect.pyi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stdlib/3/inspect.pyi b/stdlib/3/inspect.pyi index 10f9b3ff4..61737158e 100644 --- a/stdlib/3/inspect.pyi +++ b/stdlib/3/inspect.pyi @@ -1,9 +1,9 @@ import sys from typing import (AbstractSet, Any, Callable, Dict, Generator, List, Mapping, - MutableMapping, NamedTuple, Optional, Sequence, Tuple, - Union, + NamedTuple, Optional, Sequence, Tuple, Union, ) from types import CodeType, FrameType, ModuleType, TracebackType +from collections import OrderedDict # # Types and members @@ -159,7 +159,7 @@ class Parameter: annotation: Any = ...) -> Parameter: ... class BoundArguments: - arguments: MutableMapping[str, Any] + arguments: OrderedDict[str, Any] args: Tuple[Any, ...] kwargs: Dict[str, Any] signature: Signature