from typing import Any


def shortname(obj: Any) -> str:
    """Get object name (non-qualified)."""
    if not hasattr(obj, '__name__') and hasattr(obj, '__class__'):
        obj = obj.__class__
    return '.'.join((obj.__module__, obj.__name__))