From 4c6de11fc5ef287b3d541f68dea750b5bbfdef65 Mon Sep 17 00:00:00 2001 From: Kevin DeJong Date: Thu, 19 Oct 2023 14:31:36 -0700 Subject: [PATCH] update typing --- .../python/cfn_guard_rs/interface.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/cfn_guard_rs/python/cfn_guard_rs/interface.py b/packages/cfn_guard_rs/python/cfn_guard_rs/interface.py index f81ca7f4..d9d9b916 100644 --- a/packages/cfn_guard_rs/python/cfn_guard_rs/interface.py +++ b/packages/cfn_guard_rs/python/cfn_guard_rs/interface.py @@ -52,7 +52,7 @@ class RuleReport: name: str = field() metadata: Dict[str, Any] = field() - messages: Messages = field() + messages: Messages | None = field() checks: Sequence[ClauseReport] = field() @classmethod @@ -73,7 +73,7 @@ class GuardBlockReport(ValueComparisons): """Guard Block Report""" context: str = field() - messages: Messages = field() + messages: Messages | None = field() unresolved: Any = field() @classmethod @@ -100,7 +100,7 @@ def value_to(self) -> Any: class DisjunctionsReport: """Disjunctions""" - checks: ClauseReport = field() + checks: ClauseReport | None = field() @classmethod def from_object(cls, obj) -> "DisjunctionsReport" | None: @@ -115,7 +115,7 @@ class UnaryComparison: """Unary Comparison""" value: Any = field() - comparison: Tuple[str, bool] = field() + comparison: Tuple[Any, ...] | None = field() @classmethod def from_object(cls, obj) -> "UnaryComparison" | None: @@ -200,8 +200,8 @@ class UnaryReport: """Unary Report""" context: str = field() - messages: Messages = field() - check: UnaryCheck = field() + messages: Messages | None = field() + check: UnaryCheck | None = field() @classmethod def from_object(cls, obj) -> "UnaryReport" | None: @@ -286,8 +286,8 @@ def value_to(self) -> Any: @dataclass(eq=True, frozen=True) class BinaryReport: context: str = field() - messages: Messages = field() - check: BinaryCheck = field() + messages: Messages | None = field() + check: BinaryCheck | None = field() @classmethod def from_object(cls, obj) -> "BinaryReport" | None: