From 6b710eadf29f0cad77f368a05bbb570a7e139301 Mon Sep 17 00:00:00 2001 From: ftCLI Date: Tue, 26 Sep 2023 22:58:09 +0200 Subject: [PATCH] Add type annotations --- foundryToolsCLI/Lib/tables/OS_2.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/foundryToolsCLI/Lib/tables/OS_2.py b/foundryToolsCLI/Lib/tables/OS_2.py index e677970..add8399 100644 --- a/foundryToolsCLI/Lib/tables/OS_2.py +++ b/foundryToolsCLI/Lib/tables/OS_2.py @@ -403,12 +403,12 @@ def to_dict(self) -> dict: def panose_to_dict(self) -> dict: panose_dict = {} - panose_family_type = self.panose.bFamilyType - panose_data = PANOSE_STRUCT["bFamilyType"].get(panose_family_type) - family_description = panose_data["description"] + panose_family_type: int = self.panose.bFamilyType + panose_data: dict = PANOSE_STRUCT["bFamilyType"].get(panose_family_type) + family_description: str = panose_data["description"] panose_dict.update({"bFamilyType": f"Family Type: {panose_family_type} - {family_description}"}) - family_sub_digits = panose_data["sub_digits"] + family_sub_digits: dict = panose_data["sub_digits"] for k in family_sub_digits.keys(): sub_digit_description = family_sub_digits[k]["description"] sub_digit_value = getattr(self.panose, k)