From 0c799dd62931ed163e5c95397dd27d6cac63232c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 9 Aug 2023 08:24:43 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/flash/text/classification/input.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/flash/text/classification/input.py b/src/flash/text/classification/input.py index f7c8dcfd12..cb37a69326 100644 --- a/src/flash/text/classification/input.py +++ b/src/flash/text/classification/input.py @@ -53,7 +53,11 @@ def load_data( self.load_target_metadata(targets, target_formatter=target_formatter) # If we had binary multi-class targets then we also know the labels (column names) - if hasattr(self, "target_formatter") and isinstance(self.target_formatter, MultiBinaryTargetFormatter) and isinstance(target_keys, List): + if ( + hasattr(self, "target_formatter") + and isinstance(self.target_formatter, MultiBinaryTargetFormatter) + and isinstance(target_keys, List) + ): self.labels = target_keys # remove extra columns