def ends_with_semi_colon(contents: str) ->bool:
    """
    Returns `True` if a given line ends with a semi-colon.
    """
    contents = contents.strip()
    return contents.endswith(';') and not contents == '};'
