• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dfint / df-gettext-toolkit / 5870810915

pending completion
5870810915

push

github

insolor
Add refurb, fix its warnings

159 of 410 branches covered (38.78%)

Branch coverage included in aggregate %.

38 of 38 new or added lines in 14 files covered. (100.0%)

371 of 881 relevant lines covered (42.11%)

1.26 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/df_gettext_toolkit/parse/parse_text_set.py
1
from pathlib import Path
×
2
from typing import TextIO
×
3

4
from df_gettext_toolkit.create_pot.from_speech import extract_from_speech_file
×
5
from df_gettext_toolkit.parse.parse_raws import split_tag, tokenize_raw_file
×
6

7

8
def skip_text_set_header(file: TextIO) -> None:
×
9
    for item in tokenize_raw_file(file):
×
10
        if item.is_tag:
×
11
            object_tag = split_tag(item.text)
×
12
            assert object_tag[0] in {"OBJECT", "TEXT_SET"}
×
13
            if object_tag[0] == "TEXT_SET":
×
14
                return
×
15

16

17
def extract_from_vanilla_text(file_name: Path, source_encoding: str):
×
18
    with file_name.open(encoding=source_encoding) as file:
×
19
        skip_text_set_header(file)
×
20
        for item in extract_from_speech_file(file, file_name.name):
×
21
            item.source_file = file_name.name
×
22
            yield item
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc