sources: Add user-facing name constant

This commit is contained in:
kramo
2025-12-07 14:49:11 +01:00
parent bb21f383fc
commit bfa58bc1b3
2 changed files with 5 additions and 3 deletions

View File

@@ -5,7 +5,7 @@ import os
import sys
from collections.abc import Generator, Iterable
from pathlib import Path
from typing import Protocol
from typing import Final, Protocol
from gi.repository import GLib
@@ -28,7 +28,8 @@ OPEN = (
class Source(Protocol):
"""A source of games to import."""
ID: str
ID: Final[str]
NAME: Final[str]
@staticmethod
def get_games(*, skip_ids: Iterable[str]) -> Generator[Game]:

View File

@@ -9,6 +9,7 @@ import struct
import time
from collections.abc import Generator, Iterable, Sequence
from contextlib import suppress
from gettext import gettext as _
from os import SEEK_CUR
from pathlib import Path
from typing import Any, BinaryIO, NamedTuple, Self, cast
@@ -19,7 +20,7 @@ from cartridges.games import Game
from . import APPLICATION_SUPPORT, DATA, FLATPAK, OPEN, PROGRAM_FILES_X86
ID: str = "steam"
ID, NAME = "steam", _("Steam")
_DATA_PATHS = (
Path.home() / ".steam" / "steam",