diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-04-09 22:34:24 -0700 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-04-09 22:34:24 -0700 |
commit | 5e349dc4ffcad2a5d30219b56b3ac33dcd1aadc7 (patch) | |
tree | cc66551d7c540a1fc6bddddd352e37e66470c833 /cmd2.py | |
parent | 62d8c239312d51d8a1b97e1439f9ad31bb9d5fe0 (diff) | |
download | cmd2-git-5e349dc4ffcad2a5d30219b56b3ac33dcd1aadc7.tar.gz |
Remove usage of optional type hinting which is not allowed in Python 2.7
Diffstat (limited to 'cmd2.py')
-rwxr-xr-x | cmd2.py | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -42,7 +42,6 @@ import six import sys import tempfile import traceback -from typing import Union, Callable import unittest from code import InteractiveConsole @@ -213,10 +212,13 @@ REDIRECTION_CHARS = ['|', '<', '>'] HELP_CATEGORY = 'help_category' -def categorize(func: Union[Callable, Iterable], category: str): - """ - Categorize a function +def categorize(func, category): + """Categorize a function. + The help command output will group this function under the specified category heading + + :param func: Union[Callable, Iterable] - function to categorize + :param category: str - category to put it in """ if isinstance(func, Iterable): for item in func: |