[Frontend] Move async logic outside of constructor (#4674)

This commit is contained in:
Cyrus Leung
2024-05-09 13:48:33 +08:00
committed by GitHub
parent 16bc0a098f
commit f12b20decc
7 changed files with 96 additions and 102 deletions

View File

@@ -516,7 +516,7 @@ class EngineArgs:
return parser
@classmethod
def from_cli_args(cls, args: argparse.Namespace) -> 'EngineArgs':
def from_cli_args(cls, args: argparse.Namespace):
# Get the list of attributes of this dataclass.
attrs = [attr.name for attr in dataclasses.fields(cls)]
# Set the attributes from the parsed arguments.