Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-dfs
csst-dfs-client
Commits
c379610a
Commit
c379610a
authored
Dec 09, 2025
by
Wei Shoulin
Browse files
fix(plan): add return type hint and handle non-list data input
parent
6fc650b5
Pipeline
#11382
failed with stages
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
csst_dfs_client/plan.py
View file @
c379610a
...
@@ -85,7 +85,7 @@ def find_by_opid(opid: str) -> Result:
...
@@ -85,7 +85,7 @@ def find_by_opid(opid: str) -> Result:
"""
"""
return
request
.
get
(
f
"/api/plan/
{
opid
}
"
)
return
request
.
get
(
f
"/api/plan/
{
opid
}
"
)
def
load_file
(
local_file
:
Union
[
IO
,
str
,
list
]):
def
load_file
(
local_file
:
Union
[
IO
,
str
,
list
])
->
list
:
"""
"""
将本地json文件、json数据流或json数据列表写入DFS中。
将本地json文件、json数据流或json数据列表写入DFS中。
...
@@ -108,7 +108,8 @@ def load_file(local_file: Union[IO, str, list]):
...
@@ -108,7 +108,8 @@ def load_file(local_file: Union[IO, str, list]):
raise
ValueError
(
"Unsupported type for local_file"
)
raise
ValueError
(
"Unsupported type for local_file"
)
if
not
isinstance
(
data
,
list
):
if
not
isinstance
(
data
,
list
):
raise
ValueError
(
"Data must be a list of JSON objects"
)
raise
ValueError
(
"Data must be a list of JSON objects"
)
return
data
def
write_file
(
local_file
:
Union
[
IO
,
str
,
list
])
->
Result
:
def
write_file
(
local_file
:
Union
[
IO
,
str
,
list
])
->
Result
:
"""
"""
将本地json文件、json数据流或json数据列表写入DFS中。
将本地json文件、json数据流或json数据列表写入DFS中。
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment