mirror of
https://github.com/esphome/esphome.git
synced 2025-09-04 04:12:23 +01:00
[ruff] Enable FURB rules for code modernization (#9896)
This commit is contained in:
@@ -33,7 +33,7 @@ def validate_printf(value):
|
||||
[cCdiouxXeEfgGaAnpsSZ] # type
|
||||
)
|
||||
""" # noqa
|
||||
matches = re.findall(cfmt, value[CONF_FORMAT], flags=re.X)
|
||||
matches = re.findall(cfmt, value[CONF_FORMAT], flags=re.VERBOSE)
|
||||
if len(matches) != len(value[CONF_ARGS]):
|
||||
raise cv.Invalid(
|
||||
f"Found {len(matches)} printf-patterns ({', '.join(matches)}), but {len(value[CONF_ARGS])} args were given!"
|
||||
|
Reference in New Issue
Block a user