Coverage for app/venv/lib/python3.14/site-packages/weblate/checks/management/commands/updatechecks.py: 0%
11 statements
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-07 07:15 +0000
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-07 07:15 +0000
1# Copyright © Michal Čihař <michal@weblate.org>
2#
3# SPDX-License-Identifier: GPL-3.0-or-later
5from weblate.trans.management.commands import WeblateLangCommand
8class Command(WeblateLangCommand):
9 help = "updates checks for units"
11 def handle(self, *args, **options) -> None:
12 translations = {}
13 for unit in self.iterate_units(*args, **options):
14 unit.run_checks()
15 if unit.translation.id not in translations:
16 translations[unit.translation.id] = unit.translation
18 for translation in translations.values():
19 translation.invalidate_cache()