INNER CODE UNIT · Python

format_output

deltazefiro/Amarok-Hider · .github/scripts/summarize_translation_contrib.py:279

def format_output(
    contributors_by_lang: Dict[str, Set[Tuple[str, Optional[str]]]],
) -> str:
    """Format output as a single line for commit messages."""
    if not contributors_by_lang:
        return ""

    parts = []

    # Sort languages alphabetically
    for language in sorted(contributors_by_lang.keys()):
        contributors = contributors_by_lang[language]

        # Sort contributors and format mentions
        mentions = []
        for name, gh_username in sorted(contributors, key=lambda x: x[0]):
            if gh_username:
                mentions.append(f"@{gh_username}")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…