From 2cb3a97509eaa247c520ce2927638d998abfd571 Mon Sep 17 00:00:00 2001 From: Alexis Duburcq Date: Tue, 21 Jul 2020 08:38:24 +0200 Subject: [PATCH] Fix PEP8. --- tianshou/data/batch.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tianshou/data/batch.py b/tianshou/data/batch.py index e270acc63..c8a3ea25b 100644 --- a/tianshou/data/batch.py +++ b/tianshou/data/batch.py @@ -131,13 +131,13 @@ def _parse_value(v: Any): try: return torch.stack(v) except RuntimeError as e: - raise TypeError("Batch does not support non-stackable list/tuple " - "of torch.Tensor as unique value yet.") from e + raise TypeError("Batch does not support non-stackable iterable" + " of torch.Tensor as unique value yet.") from e try: v_ = _to_array_with_correct_type(v) except ValueError as e: - raise TypeError("Batch does not support heterogeneous list/tuple " - "of tensors as unique value yet.") from e + raise TypeError("Batch does not support heterogeneous list/tuple" + " of tensors as unique value yet.") from e if _is_batch_set(v): v = Batch(v) # list of dict / Batch else: