Skip to content

Commit

Permalink
Fix struct example
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Hadley committed Feb 24, 2023
1 parent e3d704e commit a08d082
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ store parameters and lists and dictionaries of parameters. For example:
from paramdb import Struct

@dataclass
class CustomStruct(Param):
class CustomStruct(Struct):
param: CustomParam
param_dict: dict[str, CustomParam]

custom_struct = CustomStruct(
param = CustomParam(value=1.23)
param = CustomParam(value=1.23),
param_dict = {
"p1": CustomParam(value=4.56),
"p2": CustomParam(value=7.89),
Expand Down

0 comments on commit a08d082

Please sign in to comment.