fix: type annotation
This commit is contained in:
parent
76590e6a25
commit
60668f86df
|
@ -1,12 +1,12 @@
|
|||
import shlex
|
||||
from typing import Any, Dict, Tuple
|
||||
from typing import Tuple
|
||||
|
||||
import rtoml
|
||||
|
||||
from joj3_config_generator.models import joj1, repo, result, task
|
||||
|
||||
|
||||
def remove_nulls(d: Dict[str, Any]) -> Dict[str, Any]:
|
||||
def remove_nulls(d: result.Config) -> result.Config:
|
||||
if isinstance(d, dict):
|
||||
return {k: remove_nulls(v) for k, v in d.items() if v is not None}
|
||||
elif isinstance(d, list):
|
||||
|
|
|
@ -4,4 +4,5 @@ from tests.convert.utils import load_case
|
|||
def test_basic() -> None:
|
||||
load_case("basic")
|
||||
|
||||
test_basic()
|
||||
|
||||
test_basic()
|
||||
|
|
|
@ -29,5 +29,5 @@ def read_convert_files(
|
|||
def load_case(case_name: str) -> None:
|
||||
repo, task, expected_result = read_convert_files(case_name)
|
||||
result = convert(repo, task).model_dump(mode="json", by_alias=True)
|
||||
|
||||
|
||||
assert result == expected_result
|
||||
|
|
Loading…
Reference in New Issue
Block a user