Skip to content

Commit 41ecbca

Browse files
committed
more target repository
1 parent e39fdfc commit 41ecbca

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

mars-cli/mars_lib/models/isa_json.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -195,17 +195,17 @@ def detect_target_repo_comments(cls, v: List[Comment]) -> Optional[List[Comment]
195195
comment for comment in v if comment.name == TARGET_REPO_KEY
196196
]
197197
if len(target_repo_comments) == 0:
198-
raise ValueError("'target repository' comment is missing")
198+
raise ValueError("'target_repository' comment is missing")
199199
elif len(target_repo_comments) > 1:
200-
raise ValueError("Multiple 'target repository' comments found")
200+
raise ValueError("Multiple 'target_repository' comments found")
201201
else:
202202
if target_repo_comments[0].value in [
203203
item.value for item in TargetRepository
204204
]:
205205
return v
206206
else:
207207
raise ValueError(
208-
f"Invalid 'target repository' value: '{target_repo_comments[0].value}'"
208+
f"Invalid 'target_repository' value: '{target_repo_comments[0].value}'"
209209
)
210210

211211

mars-cli/tests/test_isa_json.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def test_target_repo_comment_validator():
9797
"comments": [
9898
{
9999
"@id": "comment_001",
100-
"name": "target repository",
100+
"name": "target_repository",
101101
"value": TargetRepository.ENA,
102102
}
103103
],
@@ -108,7 +108,7 @@ def test_target_repo_comment_validator():
108108
"comments": [
109109
{
110110
"@id": "comment_002",
111-
"name": "target repository",
111+
"name": "target_repository",
112112
"value": "my special repo",
113113
}
114114
],

0 commit comments

Comments
 (0)