Skip to content

Commit 28ef007

Browse files
authored
Merge pull request #235 from plannigan/patch_dict_annotations
2 parents be33132 + 6e5600d commit 28ef007

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CHANGELOG.rst

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
3.5.2 (UNRELEASED)
2+
------------------
3+
4+
* Correct type annotations for ``mocker.patch.object`` to also include the string form.
5+
Thanks `@plannigan`_ for the PR (`#235`_).
6+
7+
.. _@plannigan: https://github.com/plannigan
8+
.. _#235: https://github.com/pytest-dev/pytest-mock/pull/235
9+
110
3.5.1 (2021-01-10)
211
------------------
312

src/pytest_mock/plugin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def multiple(
267267

268268
def dict(
269269
self,
270-
in_dict: Mapping[Any, Any],
270+
in_dict: Union[Mapping[Any, Any], str],
271271
values: Union[Mapping[Any, Any], Iterable[Tuple[Any, Any]]] = (),
272272
clear: bool = False,
273273
**kwargs: Any

0 commit comments

Comments
 (0)