Last active
June 14, 2021 19:52
-
-
Save LouisdeBruijn/5532fa944ac675b74ad8aeb6d7fd7e74 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from automate import docstring_from_type_hints | |
function_argument_type_hints = get_type_hints(docstring_from_type_hints) | |
function_return_argument_hint = type_hints.pop("return", None) | |
print(function_argument_type_hints) | |
>>> {'repo_dir': <class 'pathlib.Path'>, 'overwrite_script': <class 'bool'>, 'test': <class 'bool'>, 'return': <class 'str'>} | |
print(function_return_argument_hint) | |
>>> <class 'str'> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment