mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
export
This commit is contained in:
parent
abdc762e98
commit
c798a0c7bb
@ -1,7 +1,6 @@
|
||||
import argparse
|
||||
import dataclasses
|
||||
|
||||
from typeguard import check_type
|
||||
|
||||
|
||||
def build_dataclass(dataclass, args: argparse.Namespace):
|
||||
@ -12,6 +11,5 @@ def build_dataclass(dataclass, args: argparse.Namespace):
|
||||
raise ValueError(
|
||||
f"args doesn't have {field.name}. You need to set it to ArgumentsParser"
|
||||
)
|
||||
check_type(field.name, getattr(args, field.name), field.type)
|
||||
kwargs[field.name] = getattr(args, field.name)
|
||||
return dataclass(**kwargs)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user