Unverified Commit f01b0925 authored by fzyzcjy's avatar fzyzcjy Committed by GitHub
Browse files

Super tiny fix typo (#4738)

parent 14269198
...@@ -117,7 +117,7 @@ class BenchArgs: ...@@ -117,7 +117,7 @@ class BenchArgs:
@classmethod @classmethod
def from_cli_args(cls, args: argparse.Namespace): def from_cli_args(cls, args: argparse.Namespace):
# use the default value's type to case the args into correct types. # use the default value's type to cast the args into correct types.
attrs = [(attr.name, type(attr.default)) for attr in dataclasses.fields(cls)] attrs = [(attr.name, type(attr.default)) for attr in dataclasses.fields(cls)]
return cls( return cls(
**{attr: attr_type(getattr(args, attr)) for attr, attr_type in attrs} **{attr: attr_type(getattr(args, attr)) for attr, attr_type in attrs}
......
...@@ -57,7 +57,7 @@ class BenchArgs: ...@@ -57,7 +57,7 @@ class BenchArgs:
@classmethod @classmethod
def from_cli_args(cls, args: argparse.Namespace): def from_cli_args(cls, args: argparse.Namespace):
# use the default value's type to case the args into correct types. # use the default value's type to cast the args into correct types.
attrs = [(attr.name, type(attr.default)) for attr in dataclasses.fields(cls)] attrs = [(attr.name, type(attr.default)) for attr in dataclasses.fields(cls)]
return cls( return cls(
**{attr: attr_type(getattr(args, attr)) for attr, attr_type in attrs} **{attr: attr_type(getattr(args, attr)) for attr, attr_type in attrs}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment