mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 01:07:45 +01:00
Fix issue probably-meant-fstring found at https://codereview.doctor (#3415)
This commit is contained in:
parent
256395c28d
commit
2bff9937b7
1 changed files with 2 additions and 2 deletions
|
@ -107,7 +107,7 @@ def validate_gpio_pin(value):
|
||||||
value = _translate_pin(value)
|
value = _translate_pin(value)
|
||||||
variant = CORE.data[KEY_ESP32][KEY_VARIANT]
|
variant = CORE.data[KEY_ESP32][KEY_VARIANT]
|
||||||
if variant not in _esp32_validations:
|
if variant not in _esp32_validations:
|
||||||
raise cv.Invalid("Unsupported ESP32 variant {variant}")
|
raise cv.Invalid(f"Unsupported ESP32 variant {variant}")
|
||||||
|
|
||||||
return _esp32_validations[variant].pin_validation(value)
|
return _esp32_validations[variant].pin_validation(value)
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ def validate_supports(value):
|
||||||
is_pulldown = mode[CONF_PULLDOWN]
|
is_pulldown = mode[CONF_PULLDOWN]
|
||||||
variant = CORE.data[KEY_ESP32][KEY_VARIANT]
|
variant = CORE.data[KEY_ESP32][KEY_VARIANT]
|
||||||
if variant not in _esp32_validations:
|
if variant not in _esp32_validations:
|
||||||
raise cv.Invalid("Unsupported ESP32 variant {variant}")
|
raise cv.Invalid(f"Unsupported ESP32 variant {variant}")
|
||||||
|
|
||||||
if is_open_drain and not is_output:
|
if is_open_drain and not is_output:
|
||||||
raise cv.Invalid(
|
raise cv.Invalid(
|
||||||
|
|
Loading…
Reference in a new issue