From e6021e903c78513e82daa4858f78ba9a6c6f53be Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 12 Mar 2024 17:18:16 -0400 Subject: [PATCH] Use type annotation to confirm tool:creator parameter requires an object References: * https://github.com/casework/CASE-Mapping-Python/issues/3 Signed-off-by: Alex Nelson --- case_mapping/uco/tool.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/case_mapping/uco/tool.py b/case_mapping/uco/tool.py index 52785c4..b43c0da 100644 --- a/case_mapping/uco/tool.py +++ b/case_mapping/uco/tool.py @@ -1,9 +1,15 @@ +from typing import Optional + from ..base import ObjectEntity class Tool(ObjectEntity): def __init__( - self, tool_name=None, tool_version=None, tool_type=None, tool_creator=None + self, + tool_name=None, + tool_version=None, + tool_type=None, + tool_creator: Optional[ObjectEntity] = None, ): """ The Uco tool is a way to define the specifics of a tool used in an investigation