From 1a1a40390380c6bfbb2d0c2579bdd2910fba16e5 Mon Sep 17 00:00:00 2001 From: David Hartmann Date: Fri, 5 May 2023 14:53:47 +0200 Subject: [PATCH] state: minor bugfix in repr(mf.optional) --- src/miniflask/state.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/miniflask/state.py b/src/miniflask/state.py index bd6a03d..d37d8b6 100644 --- a/src/miniflask/state.py +++ b/src/miniflask/state.py @@ -375,7 +375,8 @@ def __call__(self, state, event): # pylint: disable=redefined-outer-name def str(self, asciicodes=True, color_attr=attr): if not asciicodes: color_attr = lambda x: '' # noqa: E731 no-lambda - return color_attr('dim') + "'" + str(self.type) + "' or '" + "None" + "' ⟶ " + color_attr('reset') + str(self.dependencies) + alt = "None" if isinstance(self.type, list) else "[]" + return color_attr('dim') + "'" + str(self.type) + "' or '" + alt + "' ⟶ " + color_attr('reset') def __str__(self): return self.str()