[core] Enable ruff ISC (flake8-implicit-str-concat) lint family (#16646)

This commit is contained in:
J. Nick Koston
2026-05-25 20:06:18 -05:00
committed by GitHub
parent 5172227931
commit f1839489dd
2 changed files with 6 additions and 5 deletions

View File

@@ -119,6 +119,7 @@ select = [
"FURB", # refurb
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"NPY", # numpy-specific rules
"PERF", # performance

View File

@@ -1283,11 +1283,11 @@ class PackedBufferTypeInfo(TypeInfo):
"""Dump shows buffer info but not decoded values."""
return (
f'out.append(2, \' \').append_p(ESPHOME_PSTR("{self.name}")).append(": ");\n'
+ 'out.append_p(ESPHOME_PSTR("packed buffer ["));\n'
+ f"append_uint(out, this->{self.field_name}_count_);\n"
+ 'out.append_p(ESPHOME_PSTR(" values, "));\n'
+ f"append_uint(out, this->{self.field_name}_length_);\n"
+ 'out.append_p(ESPHOME_PSTR(" bytes]\\n"));'
'out.append_p(ESPHOME_PSTR("packed buffer ["));\n'
f"append_uint(out, this->{self.field_name}_count_);\n"
'out.append_p(ESPHOME_PSTR(" values, "));\n'
f"append_uint(out, this->{self.field_name}_length_);\n"
'out.append_p(ESPHOME_PSTR(" bytes]\\n"));'
)
def dump(self, name: str) -> str: