Fix mypy errors in the tests
The config values are now a TypedDict, so check inputs for None before sorting, use literal keys and use ConfigArgs as the fake _read_config() return type.
This commit is contained in:
+1
-1
@@ -91,7 +91,7 @@ def config_calls(monkeypatch: pytest.MonkeyPatch) -> list[tuple[str, Optional[st
|
||||
calls: list[tuple[str, Optional[str]]] = []
|
||||
read_config = sb._read_config
|
||||
|
||||
def record(config_file: str, user: Optional[str] = None) -> dict[str, Any]:
|
||||
def record(config_file: str, user: Optional[str] = None) -> sb.ConfigArgs:
|
||||
calls.append((config_file, user))
|
||||
|
||||
return read_config('/nonexistent/simple_backup.conf', user)
|
||||
|
||||
Reference in New Issue
Block a user