Skip to content

Commit 565a827

Browse files
fix: updated errors
1 parent 1a1e79c commit 565a827

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

src/taskgraph/transforms/task_context.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ class TaskContextConfig(Schema):
2424
2525
If the same key is found in multiple places the order of precedence
2626
is as follows:
27-
- Parameters
28-
- `from-object` keys
29-
- File
27+
28+
- Parameters
29+
- `from-object` keys
30+
- File
3031
3132
That is to say: parameters will always override anything else.
3233
"""

src/taskgraph/util/schema.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
import pprint
77
from typing import List
8-
import re
9-
from collections.abc import Mapping
108

119
import msgspec
1210

@@ -64,9 +62,7 @@ def validator(obj):
6462
try:
6563
res[kk] = validator(vv)
6664
except Exception as e:
67-
if hasattr(e, "prepend"):
68-
e.prepend([k, kk])
69-
raise
65+
raise ValueError(f"Error in {k}.{kk}: {str(e)}") from e
7066
return res
7167
elif k.startswith("by-"):
7268
# Unknown by-field
@@ -194,7 +190,6 @@ def resolve_keyed_by(
194190
]
195191

196192

197-
198193
class Schema(msgspec.Struct, kw_only=True, omit_defaults=True, rename="kebab"):
199194
"""
200195
Base schema class that extends msgspec.Struct.

0 commit comments

Comments
 (0)