From 409ee1a87051e2d89939a02cf4609843d426a3f8 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 8 Jun 2023 14:34:49 -0400 Subject: [PATCH] Fix method return type (strict python noticed we return None here) --- scripts/py_matter_idl/matter_idl/lint/lint_rules_parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/py_matter_idl/matter_idl/lint/lint_rules_parser.py b/scripts/py_matter_idl/matter_idl/lint/lint_rules_parser.py index 81a6158f13f542..81e47de716a2e4 100755 --- a/scripts/py_matter_idl/matter_idl/lint/lint_rules_parser.py +++ b/scripts/py_matter_idl/matter_idl/lint/lint_rules_parser.py @@ -5,7 +5,7 @@ import xml.etree.ElementTree from dataclasses import dataclass from enum import Enum, auto -from typing import List, MutableMapping, Tuple, Union +from typing import List, MutableMapping, Optional, Tuple, Union from lark import Lark from lark.visitors import Discard, Transformer, v_args @@ -167,7 +167,7 @@ def GetLinterRules(self): def RequireAttribute(self, r: AttributeRequirement): self._required_attributes_rule.RequireAttribute(r) - def FindClusterCode(self, name: str) -> Tuple[str, int]: + def FindClusterCode(self, name: str) -> Optionarl[Tuple[str, int]]: if name not in self._cluster_codes: # Name may be a number. If this can be parsed as a number, accept it anyway try: