Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: c59bba8fb259db0fec2bbb77ad8ba51ea7341b56 # frozen: v0.15.20
rev: f12be1ebaa5351c1fc76472de98db2c3446c8253 # frozen: v0.16.10
hooks:
- id: ruff-check
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -20,7 +20,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 1a4bb160cab6417b3045e1b37b6b72449243e658 # frozen: 0.37.4
rev: 4f85d46a92dc17713078e5de73f8a13190edf6fc # frozen: 0.38.2
hooks:
- id: check-github-workflows

Expand All @@ -35,7 +35,7 @@ repos:
- id: check-useless-excludes

- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: e3eebf65325ccc992422292cb7a4baee967cf815 # frozen: v1.26.1
rev: fa412071e4f5d44d44f9e365f4676f9df92456a2 # frozen: v1.30.1
hooks:
- id: zizmor
args: [--fix]
Expand Down
15 changes: 8 additions & 7 deletions manage_translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@
# * warn_about_files_to_delete: lists files that are not available upstream
# * generate_commit_msg: generates commit message with co-authors

from argparse import ArgumentParser
import os
import sys
from argparse import ArgumentParser
from collections.abc import Iterable
from contextlib import chdir
from dataclasses import dataclass
from pathlib import Path
from subprocess import call, run, CalledProcessError
import sys
from subprocess import CalledProcessError, call, run
from tempfile import TemporaryDirectory
from typing import Self, Iterable
from typing import Self
from warnings import warn

from polib import pofile, POFile
from polib import POFile, pofile
from transifex.api import transifex_api

LANGUAGE = 'pl'
Expand All @@ -38,7 +39,7 @@ def fetch():
"""
if (code := call('tx --version', shell=True)) != 0:
sys.stderr.write('The Transifex client app is required.\n')
exit(code)
sys.exit(code)
lang = LANGUAGE
_call(f'tx pull -l {lang} --minimum-perc=1 --force --skip')
for file in Path().rglob('*.po'):
Expand All @@ -47,7 +48,7 @@ def fetch():

def _call(command: str):
if (return_code := call(command, shell=True)) != 0:
exit(return_code)
sys.exit(return_code)


def recreate_tx_config():
Expand Down
Loading