from typing import Optional
from typing import Tuple


def parse_user(user: str) -> Optional[Tuple[str, str]]:
    """
    Parses username and password in user:pass format.
    """
    if not user:
        return None

    col_pos = user.find(":")
    if col_pos == -1:
        return (user, "")
    return (user[0:col_pos], user[col_pos + 1 :])