diff options
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r-- | cmd2/cmd2.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index ba774f0b..0179de2b 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -3129,8 +3129,8 @@ Script should contain one command per line, just like command would be typed in cls._validate_callable_param_count(func, 0) # make sure there is no return notation signature = inspect.signature(func) - if signature.return_annotation != signature.empty: - raise TypeError('{} should not have a declared return type'.format( + if signature.return_annotation != None: + raise TypeError("{} must declare return a return type of 'None'".format( func.__name__, )) |