Skip to content

Commit

Permalink
Address review
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Sep 26, 2024
1 parent bcfa778 commit de9a328
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions Lib/unittest/mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -2757,8 +2757,6 @@ def create_autospec(spec, spec_set=False, instance=False, _parent=None,
is_async_func = _is_async_func(spec)

entries = [(entry, _missing) for entry in dir(spec)]
# Not using `is_dataclass` to avoid an import of dataclasses module
# for types that don't need that.
if is_type and instance and is_dataclass(spec):
dataclass_fields = fields(spec)
entries.extend((f.name, f.type) for f in dataclass_fields)
Expand Down

0 comments on commit de9a328

Please sign in to comment.