WIP: dev #6

Closed
李衍志523370910113 wants to merge 131 commits from dev into master
3 changed files with 5 additions and 4 deletions
Showing only changes of commit 60668f86df - Show all commits

View File

@ -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):

Why it can be in different types as the type annotation says it is result.Config?

Why it can be in different types as the type annotation says it is `result.Config`?

Sorry about this, I was still debugging on it last time I was on it. Will fix that.

Sorry about this, I was still debugging on it last time I was on it. Will fix that.
return {k: remove_nulls(v) for k, v in d.items() if v is not None}
elif isinstance(d, list):

View File

@ -4,4 +4,5 @@ from tests.convert.utils import load_case
def test_basic() -> None:
load_case("basic")
test_basic()
test_basic()

to pass test locally, forgot to delete it

to pass test locally, forgot to delete it

View File

@ -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)

why modify this?

why modify this?

ah, I guess some incompatible within convert()? to make sure actually the process is the same. If its not your wish i ll revert it

ah, I guess some incompatible within `convert()`? to make sure actually the process is the same. If its not your wish i ll revert it
assert result == expected_result