fix name collision with type in Command.return_type

This commit is contained in:
Reinier van der Leer
2024-06-07 12:57:30 +02:00
parent 6e715b6c71
commit b4cd735f26

View File

@@ -51,10 +51,10 @@ class Command(Generic[P, CO]):
@property
def return_type(self) -> type:
type = inspect.signature(self.method).return_annotation
if type == inspect.Signature.empty:
_type = inspect.signature(self.method).return_annotation
if _type == inspect.Signature.empty:
return None
return type.__name__
return _type.__name__
@property
def header(self) -> str: