예제 #1
0
 def from_json_dict(cls, param: dict) -> "Permalink":
     return Permalink(
         seed_number=param["seed"],
         spoiler=param["spoiler"],
         patcher_configuration=PatcherConfiguration.from_json_dict(
             param["patcher_configuration"]),
         layout_configuration=LayoutConfiguration.from_json_dict(
             param["layout_configuration"]),
     )
예제 #2
0
 def from_json_dict(cls, value) -> "Preset":
     return Preset(
         name=value["name"],
         description=value["description"],
         base_preset_name=value["base_preset_name"],
         patcher_configuration=PatcherConfiguration.from_json_dict(
             value["patcher_configuration"]),
         layout_configuration=LayoutConfiguration.from_json_dict(
             value["layout_configuration"]),
     )
def _patcher_with_data(request):
    return request.param["encoded"], PatcherConfiguration.from_json_dict(
        request.param["json"])