From aebe8c196524b55806cfab457b1e84f6e9a1f510 Mon Sep 17 00:00:00 2001 From: alemidev Date: Mon, 18 Apr 2022 20:46:26 +0200 Subject: [PATCH] also in main --- src/treepuncher/__main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/treepuncher/__main__.py b/src/treepuncher/__main__.py index 14a582c..972ef14 100644 --- a/src/treepuncher/__main__.py +++ b/src/treepuncher/__main__.py @@ -42,7 +42,8 @@ def main(): default = field.default if field.default is not MISSING \ else field.default_factory() if field.default_factory is not MISSING \ else MISSING - help_text += f"\n * {field.name} ({field.type.__name__}) | {'-required-' if default is MISSING else f'{default}'}" + repr_type = field.type.__name__ if isinstance(field.type, type) else str(field.type) # TODO fix for 3.8 I think? + help_text += f"\n * {field.name} ({repr_type}) | {'-required-' if default is MISSING else f'{default}'}" help_text += '\n' parser = argparse.ArgumentParser(