Skip to content

Commit

Permalink
fix: byte streams were destroyed by wrapper (#18)
Browse files Browse the repository at this point in the history
* feat: add serialization support for mashumaro

* fix(tests): on python 3.8

* feat: allow defaults to be configured by package singleton dataclass

* fix: string_repr was not cloned

* chore(codefactor): improve maintainability

* fix: byte streams were destroyed by wrapper
  • Loading branch information
matfax authored Oct 26, 2019
1 parent 220381e commit 6f2ec13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mutapath/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ def __wrap_decorator(self, *args, **kwargs):
return None

converter = __path_converter(self.clone)
if isinstance(result, List) and not isinstance(result, str):
if isinstance(result, List) and not isinstance(result, (str, bytes, bytearray)):
return list(map(converter, result))
if isinstance(result, Iterable) and not isinstance(result, str):
if isinstance(result, Iterable) and not isinstance(result, (str, bytes, bytearray)):
return (converter(g) for g in result)
return __path_converter(self.clone)(result)

Expand Down

0 comments on commit 6f2ec13

Please sign in to comment.