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
This commit is contained in:
Saul Shanabrook
2019-05-18 16:00:05 -04:00
committed by Sebastian Rittau
parent d13eb937f7
commit 38a7f14658

View File

@@ -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