How to type-hint non-basic parameters of a function?

Solution 1:

If I understand your question correctly, it's the same as for str (a type), i.e. enter the type:

def main(a_string: str, a_list: List[str], args: argparse.Namespace df: pandas.DataFrame, logger: logging.Logger) -> str:

Though I generally refactor to avoid long arg lists. I'm not a fan of having line breaks in my function signatures.

If you need to find the type(s) of an object:

>>> type(logging.root)
logging.RootLogger
>>> type(logging.root).__bases__
(logging.Logger,)