mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Fix pylint plugin for tuple[float, float] returns (#90047)
This commit is contained in:
parent
3b83340f6e
commit
c075dac916
@ -2796,7 +2796,7 @@ def _is_valid_type(
|
||||
_is_valid_type(match.group(1), node.value)
|
||||
and isinstance(node.slice, nodes.Tuple)
|
||||
and all(
|
||||
_is_valid_type(match.group(n + 2), node.slice.elts[n])
|
||||
_is_valid_type(match.group(n + 2), node.slice.elts[n], in_return)
|
||||
for n in range(len(node.slice.elts))
|
||||
)
|
||||
)
|
||||
|
@ -776,7 +776,7 @@ def test_valid_long_tuple(
|
||||
# Set ignore option
|
||||
type_hint_checker.config.ignore_missing_annotations = False
|
||||
|
||||
class_node, _, _ = astroid.extract_node(
|
||||
class_node, _, _, _ = astroid.extract_node(
|
||||
"""
|
||||
class Entity():
|
||||
pass
|
||||
@ -790,6 +790,12 @@ def test_valid_long_tuple(
|
||||
class TestLight( #@
|
||||
LightEntity
|
||||
):
|
||||
@property
|
||||
def hs_color( #@
|
||||
self
|
||||
) -> tuple[int, int]:
|
||||
pass
|
||||
|
||||
@property
|
||||
def rgbw_color( #@
|
||||
self
|
||||
|
Loading…
x
Reference in New Issue
Block a user