mirror of
https://github.com/zeldaret/mm.git
synced 2026-07-30 15:53:44 -04:00
b6904aa2cc
* remove ZAPD submodule * git subrepo clone https://github.com/zeldaret/ZAPD.git tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "ca229f19" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "ca229f19" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * git subrepo clone https://github.com/simonlindholm/decomp-permuter.git tools/decomp-permuter subrepo: subdir: "tools/decomp-permuter" merged: "1e4b85a7" upstream: origin: "https://github.com/simonlindholm/decomp-permuter.git" branch: "main" commit: "1e4b85a7" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * Remove asm-differ * git subrepo clone https://github.com/simonlindholm/asm-differ.git tools/asm-differ subrepo: subdir: "tools/asm-differ" merged: "eaf72269" upstream: origin: "https://github.com/simonlindholm/asm-differ.git" branch: "master" commit: "eaf72269" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * remove asm-processor * git subrepo clone https://github.com/simonlindholm/asm-processor.git tools/asm-processor subrepo: subdir: "tools/asm-processor" merged: "85288fcd" upstream: origin: "https://github.com/simonlindholm/asm-processor.git" branch: "master" commit: "85288fcd" git-subrepo: version: "0.4.3" origin: "???" commit: "???" * remove .gitmodules file * Update REAMDE * Update warnings
23 lines
441 B
Python
23 lines
441 B
Python
import os
|
|
from typing import NoReturn
|
|
|
|
|
|
def plural(n: int, noun: str) -> str:
|
|
s = "s" if n != 1 else ""
|
|
return f"{n} {noun}{s}"
|
|
|
|
|
|
def exception_to_string(e: object) -> str:
|
|
return str(e) or e.__class__.__name__
|
|
|
|
|
|
def static_assert_unreachable(x: NoReturn) -> NoReturn:
|
|
raise Exception("Unreachable! " + repr(x))
|
|
|
|
|
|
def try_remove(path: str) -> None:
|
|
try:
|
|
os.remove(path)
|
|
except FileNotFoundError:
|
|
pass
|