Fix issue probably-meant-fstring found at https://codereview.doctor (#3415)

This commit is contained in:
code-review-doctor 2022-04-26 20:43:35 +01:00 committed by GitHub
parent 256395c28d
commit 2bff9937b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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(