mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-06 21:09:53 +02:00
Bump pylint from 2.10.2 to 2.11.1 (#2334)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Otto winter <otto@otto-winter.com>
This commit is contained in:
@@ -40,7 +40,7 @@ def validate_type(value):
|
||||
raise cv.Invalid("Must have B in type")
|
||||
rest = set(value) - set("RGBW")
|
||||
if rest:
|
||||
raise cv.Invalid("Type has invalid color: {}".format(", ".join(rest)))
|
||||
raise cv.Invalid(f"Type has invalid color: {', '.join(rest)}")
|
||||
if len(set(value)) != len(value):
|
||||
raise cv.Invalid("Type has duplicate color!")
|
||||
return value
|
||||
@@ -95,9 +95,7 @@ def validate_method_pin(value):
|
||||
for opt in (CONF_PIN, CONF_CLOCK_PIN, CONF_DATA_PIN):
|
||||
if opt in value and value[opt] not in pins_:
|
||||
raise cv.Invalid(
|
||||
"Method {} only supports pin(s) {}".format(
|
||||
method, ", ".join(f"GPIO{x}" for x in pins_)
|
||||
),
|
||||
f"Method {method} only supports pin(s) {', '.join(f'GPIO{x}' for x in pins_)}",
|
||||
path=[CONF_METHOD],
|
||||
)
|
||||
return value
|
||||
@@ -139,7 +137,7 @@ def format_method(config):
|
||||
|
||||
if config[CONF_INVERT]:
|
||||
if method == "ESP8266_DMA":
|
||||
variant = "Inverted" + variant
|
||||
variant = f"Inverted{variant}"
|
||||
else:
|
||||
variant += "Inverted"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user