INNER CODE UNIT · Python

working_tree_clean

emanuele-f/PCAPdroid · tools/weblate.py:118

def working_tree_clean():
    return git("diff", "--quiet", "--", STRINGS_BASE, check=False).returncode == 0 and \
           git("diff", "--cached", "--quiet", "--", STRINGS_BASE, check=False).returncode == 0

def get_supported_locales():
    """Non-English locales from resourceConfigurations in build.gradle."""
    with open(BUILD_GRADLE) as f:
        content = f.read()
    locales = re.findall(r'"([a-z]{2}(?:-r[A-Z]{2})?)"',
                         content.split("resourceConfigurations")[1].split("]")[0])
    locales = [l for l in locales if l != "en"]
    return sorted(locales)

# ---------------------------------------------------------------------------
# Grouping consecutive commits by author
# ---------------------------------------------------------------------------

def group_by_author(commits):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…