nixos-rebuild-ng: fix mypy issues

This commit is contained in:
Thiago Kenji Okada
2025-09-22 12:13:19 +01:00
parent 08371b385d
commit f5e7824fb3
3 changed files with 3 additions and 2 deletions
@@ -1,3 +1,4 @@
# mypy: disable-error-code=comparison-overlap
from typing import Final
# Build-time flags
@@ -8,7 +8,7 @@ from typing import Any, ClassVar, Self, TypedDict, override
from .process import Remote, run_wrapper
type ImageVariants = list[str]
type ImageVariants = dict[str, str]
class NixOSRebuildError(Exception):
@@ -14,7 +14,7 @@ class LogFormatter(logging.Formatter):
}
@override
def format(self, record: logging.LogRecord) -> str:
def format(self, record: logging.LogRecord) -> Any:
record.levelname = record.levelname.lower()
formatter = self.formatters.get(record.levelno, self.formatters["DEFAULT"])
return formatter.format(record)