1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-06 05:12:21 +01:00

Remove a bunch of unnecessary pylint disabling (#4079)

This commit is contained in:
Jesse Hills
2022-11-24 11:09:19 +13:00
committed by GitHub
parent 81b4078871
commit b184b01600
16 changed files with 24 additions and 54 deletions

View File

@@ -1053,9 +1053,8 @@ def mqtt_qos(value):
def requires_component(comp):
"""Validate that this option can only be specified when the component `comp` is loaded."""
# pylint: disable=unsupported-membership-test
def validator(value):
# pylint: disable=unsupported-membership-test
if comp not in CORE.loaded_integrations:
raise Invalid(f"This option requires component {comp}")
return value
@@ -1482,7 +1481,6 @@ class OnlyWith(Optional):
@property
def default(self):
# pylint: disable=unsupported-membership-test
if self._component in CORE.loaded_integrations:
return self._default
return vol.UNDEFINED