chore: drop type ignores mypy never reads

This commit is contained in:
Abdessamad Derraz committed 2026-11-17 16:44:35 +01:00
1 parent ecf225d007
commit 7895edd582
6 files changed
+9 -9

No files matched your search

+4 -4
View File
@@ -67,9 +67,9 @@ def guard() -> None:
_refuse(host)
return getaddrinfo(host, *args, **kwargs)
socket.socket.connect = guarded_connect # type: ignore[method-assign]
socket.socket.connect_ex = guarded_connect_ex # type: ignore[method-assign]
socket.getaddrinfo = guarded_getaddrinfo # type: ignore[assignment]
socket.socket.connect = guarded_connect
socket.socket.connect_ex = guarded_connect_ex
socket.getaddrinfo = guarded_getaddrinfo
ismount = os.path.ismount
@@ -81,7 +81,7 @@ def guard() -> None:
return False
return ismount(path)
os.path.ismount = guarded_ismount # type: ignore[assignment]
os.path.ismount = guarded_ismount
def unguard() -> None:
+1 -1
View File
@@ -118,7 +118,7 @@ class BatoceraScraper(unittest.TestCase):
class RocknixScraper(unittest.TestCase):
def _requirements(self, script: str):
scraper = rocknix_scraper.Scraper(url="https://example.invalid/rocknix-systems")
scraper._fetch_raw = lambda: script # type: ignore[method-assign]
scraper._fetch_raw = lambda: script
return {req.name: requirement_entry(req) for req in scraper.fetch_requirements()}
def test_string_and_list(self):
+1 -1
View File
@@ -201,7 +201,7 @@ class Journeys(unittest.TestCase):
self.screens.append(screen)
return screen
term.wait = wait # type: ignore[method-assign]
term.wait = wait
return term
def press(self, term: Pty, *keys: str) -> None:
+1 -1
View File
@@ -391,7 +391,7 @@ def configgen(**overrides: str) -> kl.Configgen:
def sites(path: str, kind: str, **fields: object) -> list[dict]:
spec = kl.GenericSites(path, kind, **fields) # type: ignore[arg-type]
spec = kl.GenericSites(path, kind, **fields)
return [launcher.entry() for launcher in kl.bios_sites(configgen(), spec)]
+1 -1
View File
@@ -890,7 +890,7 @@ class SourceLinksGoWhereTheFileIs(unittest.TestCase):
def _render(self, tree: frozenset[str]) -> str:
original = sitesources._tree_paths
sitesources._tree_paths = lambda repo, pin: tree # type: ignore[assignment]
sitesources._tree_paths = lambda repo, pin: tree
try:
return sitesources._source_ref_markdown(
self.PROFILE, "src/emulator.cpp:234; src/core/loader/ncch.cpp:151-164")
+1 -1
View File
@@ -41,7 +41,7 @@ class BinaryContinuationsAreNotLinked(unittest.TestCase):
def _render(self, value: str) -> str:
original = sitesources._tree_paths
sitesources._tree_paths = lambda repo, pin: frozenset({"FPLoader.cpp"}) # type: ignore[assignment]
sitesources._tree_paths = lambda repo, pin: frozenset({"FPLoader.cpp"})
try:
return sitesources._source_ref_markdown(self.PROFILE, value)
finally: