mirror of
https://github.com/esphome/esphome.git
synced 2026-06-24 13:27:14 +00:00
[core] Enable ruff ISC (flake8-implicit-str-concat) lint family (#16646)
This commit is contained in:
@@ -119,6 +119,7 @@ select = [
|
|||||||
"FURB", # refurb
|
"FURB", # refurb
|
||||||
"I", # isort
|
"I", # isort
|
||||||
"ICN", # flake8-import-conventions
|
"ICN", # flake8-import-conventions
|
||||||
|
"ISC", # flake8-implicit-str-concat
|
||||||
"LOG", # flake8-logging
|
"LOG", # flake8-logging
|
||||||
"NPY", # numpy-specific rules
|
"NPY", # numpy-specific rules
|
||||||
"PERF", # performance
|
"PERF", # performance
|
||||||
|
|||||||
@@ -1283,11 +1283,11 @@ class PackedBufferTypeInfo(TypeInfo):
|
|||||||
"""Dump shows buffer info but not decoded values."""
|
"""Dump shows buffer info but not decoded values."""
|
||||||
return (
|
return (
|
||||||
f'out.append(2, \' \').append_p(ESPHOME_PSTR("{self.name}")).append(": ");\n'
|
f'out.append(2, \' \').append_p(ESPHOME_PSTR("{self.name}")).append(": ");\n'
|
||||||
+ 'out.append_p(ESPHOME_PSTR("packed buffer ["));\n'
|
'out.append_p(ESPHOME_PSTR("packed buffer ["));\n'
|
||||||
+ f"append_uint(out, this->{self.field_name}_count_);\n"
|
f"append_uint(out, this->{self.field_name}_count_);\n"
|
||||||
+ 'out.append_p(ESPHOME_PSTR(" values, "));\n'
|
'out.append_p(ESPHOME_PSTR(" values, "));\n'
|
||||||
+ f"append_uint(out, this->{self.field_name}_length_);\n"
|
f"append_uint(out, this->{self.field_name}_length_);\n"
|
||||||
+ 'out.append_p(ESPHOME_PSTR(" bytes]\\n"));'
|
'out.append_p(ESPHOME_PSTR(" bytes]\\n"));'
|
||||||
)
|
)
|
||||||
|
|
||||||
def dump(self, name: str) -> str:
|
def dump(self, name: str) -> str:
|
||||||
|
|||||||
Reference in New Issue
Block a user