From c193402ba72e84fcca851c26dc0a764a6c8efa1a Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Mon, 27 Mar 2023 13:53:14 +0200 Subject: [PATCH] Remove incorrect ignore in pylint plugin (#90024) * Remove incorrect ignore_missing_annotations * Allow tuple[int, int] in hs_color * Adjust notify targets * Always check for return type inheritance * Adjust tests * Revert "Always check for return type inheritance" This reverts commit 3528742adf98edc6481f2c954c032ace881e1d6e. * Revert "Allow tuple[int, int] in hs_color" This reverts commit d51c1731eff3d59b9e94e7a7e914933ceaf8e34f. * Revert "Adjust notify targets" This reverts commit 4cba77a7309dc89980e29d6d5b9107d9e55f7070. --- pylint/plugins/hass_enforce_type_hints.py | 4 +--- tests/pylint/test_enforce_type_hints.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pylint/plugins/hass_enforce_type_hints.py b/pylint/plugins/hass_enforce_type_hints.py index 0581569c2d6..4fb471e2145 100644 --- a/pylint/plugins/hass_enforce_type_hints.py +++ b/pylint/plugins/hass_enforce_type_hints.py @@ -2974,9 +2974,7 @@ class HassTypeHintChecker(BaseChecker): # type: ignore[misc] if class_matches := _CLASS_MATCH.get(module_platform): self._class_matchers.extend(class_matches) - if not self.linter.config.ignore_missing_annotations and ( - property_matches := _INHERITANCE_MATCH.get(module_platform) - ): + if property_matches := _INHERITANCE_MATCH.get(module_platform): self._class_matchers.extend(property_matches) self._class_matchers.reverse() diff --git a/tests/pylint/test_enforce_type_hints.py b/tests/pylint/test_enforce_type_hints.py index 9e8df452b61..b80d8f01445 100644 --- a/tests/pylint/test_enforce_type_hints.py +++ b/tests/pylint/test_enforce_type_hints.py @@ -574,7 +574,7 @@ def test_ignore_invalid_entity_properties( async def async_lock( self, **kwargs - ) -> bool: + ): pass """, "homeassistant.components.pylint_test.lock",