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-pipeline
csst_common
Commits
439ecc4c
Commit
439ecc4c
authored
Sep 23, 2025
by
BO ZHANG
🏀
Browse files
remove type check for meta data
parent
56331f8b
Pipeline
#10488
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
csst_common/io.py
View file @
439ecc4c
...
...
@@ -89,10 +89,10 @@ def generate_meta(**kwargs) -> fits.Header:
for
k
in
kwargs
.
keys
():
if
k
in
meta
.
keys
():
# 类型必须兼容
assert
isinstance
(
kwargs
[
k
],
type
(
meta
[
k
])
),
f
"类型不兼容: kwargs['
{
k
}
'] 应为
{
type
(
meta
[
k
]).
__name__
}
或其子类"
# 赋值
#
assert isinstance(
#
kwargs[k], type(meta[k])
#
), f"类型不兼容: kwargs['{k}'] 应为 {type(meta[k]).__name__} 或其子类"
#
#
赋值
meta
[
k
]
=
kwargs
[
k
]
else
:
raise
KeyError
(
f
"未知的meta参数:
{
k
}
"
)
...
...
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