Commit 34976988 authored by Jörg Thalheim's avatar Jörg Thalheim
Browse files

nixos-rebuild-ng: require type annotations

parent cca8865f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ type ImageVariants = dict[str, str]
class NRError(Exception):
    "nixos-rebuild general error."

    def __init__(self, message: str):
    def __init__(self, message: str) -> None:
        self.message = message

    @override
+6 −0
Original line number Diff line number Diff line
@@ -39,6 +39,8 @@ ignore_missing_imports = true

[tool.ruff.lint]
extend-select = [
    # Enforce type annotations
    "ANN",
    # don't shadow built-in names
    "A",
    # Better list/set/dict comprehensions
@@ -58,6 +60,10 @@ extend-select = [
    # check for needless exception names in raise statements
    "TRY201",
]
ignore = [
    # allow Any type
   "ANN401"
]

[tool.ruff.lint.per-file-ignores]
"tests/" = ["FA102"]