Skip to content

Commit

Permalink
Fix method return type (strict python noticed we return None here) (#…
Browse files Browse the repository at this point in the history
…27156)

* Fix method return type (strict python noticed we return None here)

* Fix typo

* Fix a typo

* Revert unintended repo change

---------

Co-authored-by: Andrei Litvin <andreilitvin@google.com>
  • Loading branch information
andy31415 and andreilitvin authored Jun 9, 2023
1 parent 530349a commit 50654bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions scripts/py_matter_idl/matter_idl/lint/lint_rules_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) -> Optional[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:
Expand Down
2 changes: 1 addition & 1 deletion src/lib/support/StringSplitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class StringSplitter
}
}

/// Returns the next character san
/// Returns the next character span
///
/// out - contains the next element or a nullptr/0 sized span if
/// no elements available
Expand Down

0 comments on commit 50654bf

Please sign in to comment.