Fix CI/CD issues: linting errors and test file corruption
Some checks failed
CI / test (ubuntu-latest, 3.10) (push) Has been cancelled
CI / test (ubuntu-latest, 3.11) (push) Has been cancelled
CI / test (ubuntu-latest, 3.12) (push) Has been cancelled
CI / test (ubuntu-latest, 3.8) (push) Has been cancelled
CI / test (ubuntu-latest, 3.9) (push) Has been cancelled
CI / test-minimal (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / build (push) Has been cancelled
CI / release (push) Has been cancelled
Some checks failed
CI / test (ubuntu-latest, 3.10) (push) Has been cancelled
CI / test (ubuntu-latest, 3.11) (push) Has been cancelled
CI / test (ubuntu-latest, 3.12) (push) Has been cancelled
CI / test (ubuntu-latest, 3.8) (push) Has been cancelled
CI / test (ubuntu-latest, 3.9) (push) Has been cancelled
CI / test-minimal (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / build (push) Has been cancelled
CI / release (push) Has been cancelled
This commit is contained in:
@@ -37,7 +37,9 @@ def parse_type_spec(type_spec: TypeSpec) -> Tuple[str, Optional[Dict[str, Any]]]
|
|||||||
return "unknown", None
|
return "unknown", None
|
||||||
|
|
||||||
|
|
||||||
def check_type(value: Any, expected_type: TypeSpec) -> Tuple[bool, Optional[str]]:
|
def check_type(
|
||||||
|
value: Any, expected_type: TypeSpec
|
||||||
|
) -> Tuple[bool, Optional[str]]:
|
||||||
"""Check if a value matches the expected type specification."""
|
"""Check if a value matches the expected type specification."""
|
||||||
actual_type = infer_type(value)
|
actual_type = infer_type(value)
|
||||||
type_name, type_info = parse_type_spec(expected_type)
|
type_name, type_info = parse_type_spec(expected_type)
|
||||||
@@ -73,7 +75,9 @@ def check_type(value: Any, expected_type: TypeSpec) -> Tuple[bool, Optional[str]
|
|||||||
return True, None
|
return True, None
|
||||||
|
|
||||||
|
|
||||||
def validate_types(data: Any, type_spec: TypeSpec, path: str = "root") -> List[str]:
|
def validate_types(
|
||||||
|
data: Any, type_spec: TypeSpec, path: str = "root"
|
||||||
|
) -> List[str]:
|
||||||
"""Validate data against a type specification and return all errors."""
|
"""Validate data against a type specification and return all errors."""
|
||||||
errors = []
|
errors = []
|
||||||
valid, error = check_type(data, type_spec)
|
valid, error = check_type(data, type_spec)
|
||||||
|
|||||||
Reference in New Issue
Block a user