Fix some type issues
This commit is contained in:
@@ -63,18 +63,11 @@ def create_clan(options: CreateOptions) -> CreateClanResponse:
|
||||
)
|
||||
out = run(command, cwd=directory)
|
||||
|
||||
# Write inventory.json file
|
||||
inventory = Inventory.load_file(directory)
|
||||
if options.meta is not None:
|
||||
inventory.meta = options.meta
|
||||
|
||||
## Begin: setup git
|
||||
command = nix_shell(["nixpkgs#git"], ["git", "init"])
|
||||
out = run(command, cwd=directory)
|
||||
cmd_responses["git init"] = out
|
||||
|
||||
# Persist also create a commit message for each change
|
||||
inventory.persist(directory, "Init inventory")
|
||||
|
||||
command = nix_shell(["nixpkgs#git"], ["git", "add", "."])
|
||||
out = run(command, cwd=directory)
|
||||
cmd_responses["git add"] = out
|
||||
@@ -88,6 +81,14 @@ def create_clan(options: CreateOptions) -> CreateClanResponse:
|
||||
)
|
||||
out = run(command, cwd=directory)
|
||||
cmd_responses["git config"] = out
|
||||
## End: setup git
|
||||
|
||||
# Write inventory.json file
|
||||
inventory = Inventory.load_file(directory)
|
||||
if options.meta is not None:
|
||||
inventory.meta = options.meta
|
||||
# Persist creates a commit message for each change
|
||||
inventory.persist(directory, "Init inventory")
|
||||
|
||||
command = ["nix", "flake", "update"]
|
||||
out = run(command, cwd=directory)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import os
|
||||
from collections import defaultdict
|
||||
from collections.abc import Callable
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
import pytest
|
||||
from age_keys import SopsSetup
|
||||
@@ -14,7 +16,7 @@ def def_value() -> defaultdict:
|
||||
|
||||
|
||||
# allows defining nested dictionary in a single line
|
||||
nested_dict = lambda: defaultdict(def_value)
|
||||
nested_dict: Callable[[], dict[str, Any]] = lambda: defaultdict(def_value)
|
||||
|
||||
|
||||
@pytest.mark.impure
|
||||
|
||||
Reference in New Issue
Block a user