tests/f2: allow string lists as config values

not all values are sets. the search path for example is definitely ordered.

Change-Id: Ice94fe324319731ae3a83c757768c48576ba8b36
This commit is contained in:
eldritch horrors
2026-01-02 13:01:14 +00:00
parent bdd6bd5e38
commit a7bd1a8a80
3 changed files with 6 additions and 3 deletions
+3 -1
View File
@@ -120,8 +120,10 @@ def is_value_of_type(value: Any, expected_type: type[Any] | UnionType) -> bool:
if expected_type is Any:
return True
match origin:
case None | types.UnionType:
case None:
return isinstance(value, expected_type)
case types.UnionType:
return any(is_value_of_type(value, t) for t in get_args(expected_type))
case typing.Literal:
return value in get_args(expected_type)
case builtins.type: