mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-25 02:57:52 -06:00
refactor: one copy of each duplicated helper
This commit is contained in:
1 parent
2c8a9cfad8
commit
238f70c7a7
11 files changed
+49
-79
No files matched your search
@@ -15,6 +15,8 @@ import re
|
||||
from collections.abc import Callable, Iterable
|
||||
from dataclasses import dataclass, field
|
||||
|
||||
from model.sourceref import span
|
||||
|
||||
from .base_scraper import fetch_bytes, github_headers
|
||||
from .configgen_launchers import LauncherShapeError
|
||||
|
||||
@@ -33,10 +35,6 @@ class LauncherPatternMissing(LauncherShapeError):
|
||||
super().__init__(f"{path}: {what} not found")
|
||||
|
||||
|
||||
def span(first: int, last: int) -> str:
|
||||
return str(first) if first == last else f"{first}-{last}"
|
||||
|
||||
|
||||
def merge_lines(lines: Iterable[int]) -> list[tuple[int, int]]:
|
||||
"""Line numbers as sorted spans, a gap of one line joined."""
|
||||
spans: list[tuple[int, int]] = []
|
||||
|
||||
Reference in new issue
Block a user