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

dfint / df-gettext-toolkit / 5871136315

pending completion
5871136315

push

github

insolor
Upgrade style of the type annotations using ruff

157 of 404 branches covered (38.86%)

Branch coverage included in aggregate %.

53 of 53 new or added lines in 18 files covered. (100.0%)

369 of 876 relevant lines covered (42.12%)

1.26 hits per line

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

0.0
/df_gettext_toolkit/utils/csv_utils.py
1
import csv
×
2
from collections.abc import Iterator
×
3
from pathlib import Path
×
4
from typing import TextIO
×
5

6

7
def writer(file: TextIO, **kwargs):
×
8
    return csv.writer(file, dialect="unix", lineterminator="\r\n", **kwargs)
×
9

10

11
def reader(file: TextIO, **kwargs):
×
12
    return csv.reader(file, dialect="unix", lineterminator="\r\n", **kwargs)
×
13

14

15
def write_csv(file_path: Path, encoding: str, data: list[list[str]]):
×
16
    with file_path.open("w", encoding=encoding, newline="") as file:
×
17
        csv_writer = writer(file)
×
18
        csv_writer.writerows(data)
×
19

20

21
def read_csv(file_path: Path, encoding: str) -> Iterator[list[str]]:
×
22
    with file_path.open(encoding=encoding, newline="") as file:
×
23
        csv_reader = reader(file)
×
24
        yield from csv_reader
×
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