mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-24 02:27:52 -06:00
chore: type the test fixtures mypy rejected
This commit is contained in:
1 parent
f77caa1885
commit
7f19ff2ceb
3 files changed
+9
-5
No files matched your search
@@ -2838,7 +2838,7 @@ class ReleaseAssetsMatchTheCollection(unittest.TestCase):
|
||||
|
||||
from scripts import pipeline
|
||||
|
||||
def steps(*flags: str) -> list[str]:
|
||||
def steps(*flags: str) -> tuple[list[str], str]:
|
||||
ran: list[str] = []
|
||||
|
||||
def record(cmd, label):
|
||||
@@ -4249,7 +4249,7 @@ class ACitationInsideASourceRefIsTracked(unittest.TestCase):
|
||||
zesarux cited src/cpu.h:545 inside an annotation, four lines off at its
|
||||
pin, and pce-emu joined two citations with ` + `: neither was anchored."""
|
||||
|
||||
def citations(self, ref: str) -> list[str]:
|
||||
def citations(self, ref: str) -> list[tuple[str, str]]:
|
||||
from scripts.profiling.citations import collect_citations
|
||||
|
||||
document = {"files": [{"name": "x.rom", "source_ref": ref}]}
|
||||
@@ -7600,9 +7600,11 @@ class ExternalDownloadsFollowTheRunPolicy(unittest.TestCase):
|
||||
ENTRY = {"name": "ext.bin", "source_url": "https://example.invalid/ext.bin",
|
||||
"sha1": hashlib.sha1(b"payload").hexdigest()}
|
||||
|
||||
class _Body(io.BytesIO):
|
||||
headers: dict = {}
|
||||
|
||||
def _response(self, body: bytes):
|
||||
stream = io.BytesIO(body)
|
||||
stream.headers = {}
|
||||
stream = self._Body(body)
|
||||
response = mock.MagicMock()
|
||||
response.__enter__.return_value = stream
|
||||
response.__exit__.return_value = False
|
||||
|
||||
@@ -848,7 +848,7 @@ class BiosIntegrity(Scratch):
|
||||
"bios/Big/large.iso": b"\x99" * 2048,
|
||||
}
|
||||
(self.repo / ".gitignore").write_text("bios/Big/large.iso\n", encoding="utf-8")
|
||||
self.db = {"files": {}}
|
||||
self.db: dict[str, dict[str, dict[str, str]]] = {"files": {}}
|
||||
for rel, data in files.items():
|
||||
path = self.repo / rel
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
@@ -182,6 +182,8 @@ def find_cycle(nodes: set[str], edges: dict[str, set[str]]) -> list[str] | None:
|
||||
|
||||
|
||||
class ImportLayers(unittest.TestCase):
|
||||
graph: Graph
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls) -> None:
|
||||
cls.graph = Graph()
|
||||
|
||||
Reference in new issue
Block a user