From 25311699e33a68dd0ce6f0f74c3df0863a0dda85 Mon Sep 17 00:00:00 2001 From: Vatsal Ghelani <152916324+vatsalghelani-csa@users.noreply.github.com> Date: Thu, 28 Mar 2024 11:08:16 -0400 Subject: [PATCH] Added the dataclass to be optional --- scripts/tests/py/metadata.py | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/scripts/tests/py/metadata.py b/scripts/tests/py/metadata.py index 60999dc572cca5..7648ea31fb7ab0 100644 --- a/scripts/tests/py/metadata.py +++ b/scripts/tests/py/metadata.py @@ -16,24 +16,25 @@ from pathlib import Path import re import yaml +from typing import Optional @dataclass class Metadata: - py_script_path: str = None - run: str = None - app: str = None - factoryreset: bool = False - comissioning_method: str = None - discriminator: int = None - kvs: str = None - storage_path: str = None - on_network_commission: str = None - passcode: int = None - endpoint: str = None - manual_code: str = None - PICS: str = None - tests: str = None + py_script_path: Optional[str] = None + run: Optional[str] = None + app: Optional[str] = None + factoryreset: Optional[bool] = False + comissioning_method: Optional[str] = None + discriminator: Optional[int] = None + kvs: Optional[str] = None + storage_path: Optional[str] = None + on_network_commission: Optional[str] = None + passcode: Optional[int] = None + endpoint: Optional[str] = None + manual_code: Optional[str] = None + PICS: Optional[str] = None + tests: Optional[str] = None class Metadata_Reader: