from typing import Optional


def get_header(linesep: str, output_format: Optional[str] = None) -> str:
    """Return appropriate header line for selected output format
    :param output_format: output format from string parser
    :param linesep: correct linesep for chosen destination
    :return: a one-line string"""
    # pylint: disable=R1705
    if output_format == "csv":
        return (
            ",".join(
                (
                    "File",
                    "Rg",
                    "Rg StDev",
                    "I(0)",
                    "I(0) StDev",
                    "First point",
                    "Last point",
                    "Quality,Aggregated",
                )
            )
            + linesep
        )
    else:
        return ""