Coverage for moptipyapps/spoc/spoc_4/challenge_1/beginner/data/__init__.py: 100%
5 statements
« prev ^ index » next coverage.py v7.14.1, created at 2026-05-28 09:42 +0000
« prev ^ index » next coverage.py v7.14.1, created at 2026-05-28 09:42 +0000
1"""
2The Lunar Tomato Logistics beginner problem data.
4See <https://github.com/esa/SpOC4> for the original source of the data.
5"""
7from importlib import resources # nosem # noqa: RUF067
8from typing import TextIO, cast # noqa: RUF067
10from pycommons.io.path import UTF8 # noqa: RUF067
13def open_resource_stream(file_name: str) -> TextIO: # noqa: RUF067
14 """
15 Open a matching resource stream.
17 :param file_name: the file name of the resource
18 :return: the stream
19 """
20 return cast("TextIO", resources.files(__package__).joinpath(
21 file_name).open("r", encoding=UTF8))