From db9d57a526d548aa44756c3ae5ffb87756a9d125 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Thu, 16 Jun 2022 20:01:28 -0400 Subject: [PATCH] Common: Remove `class Meta` from marshmallow schemas `RAISE` is the default behavior, so there's no need to copy/paste this all over the place. --- monkey/common/configuration/agent_configuration.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/monkey/common/configuration/agent_configuration.py b/monkey/common/configuration/agent_configuration.py index 5bb1feba4..bb7e08bbc 100644 --- a/monkey/common/configuration/agent_configuration.py +++ b/monkey/common/configuration/agent_configuration.py @@ -1,7 +1,7 @@ from dataclasses import dataclass from typing import Dict, List -from marshmallow import RAISE, Schema, fields, post_load +from marshmallow import Schema, fields, post_load from marshmallow_enum import EnumField from common import OperatingSystems @@ -16,9 +16,6 @@ class CustomPBAConfiguration: class CustomPBAConfigurationSchema(Schema): - class Meta: - unknown = RAISE - linux_command = fields.Str() linux_filename = fields.Str() windows_command = fields.Str() @@ -36,9 +33,6 @@ class PluginConfiguration: class PluginConfigurationSchema(Schema): - class Meta: - unknown = RAISE - name = fields.Str() options = fields.Mapping() @@ -68,9 +62,6 @@ class ExploiterConfiguration: class ExploiterConfigurationSchema(Schema): - class Meta: - unknown = RAISE - name = fields.Str() options = fields.Mapping() supported_os = fields.List(EnumField(OperatingSystems))