mirror of
https://github.com/esphome/esphome.git
synced 2026-10-05 10:31:29 +00:00
Merge remote-tracking branch 'upstream/dev' into pack-entity-strings
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2473,9 +2473,6 @@ def build_base_class(
|
||||
out = f"class {base_class_name} : public {parent_class} {{\n"
|
||||
out += " public:\n"
|
||||
|
||||
# Add destructor with override
|
||||
public_content.insert(0, f"~{base_class_name}() override = default;")
|
||||
|
||||
# Base classes don't implement encode/decode/calculate_size
|
||||
# Derived classes handle these with their specific field numbers
|
||||
cpp = ""
|
||||
@@ -2483,6 +2480,8 @@ def build_base_class(
|
||||
out += indent("\n".join(public_content)) + "\n"
|
||||
out += "\n"
|
||||
out += " protected:\n"
|
||||
# Non-virtual protected destructor prevents accidental polymorphic deletion
|
||||
protected_content.insert(0, f"~{base_class_name}() = default;")
|
||||
out += indent("\n".join(protected_content))
|
||||
if protected_content:
|
||||
out += "\n"
|
||||
|
||||
+1
-1
@@ -959,7 +959,7 @@ def main():
|
||||
continue
|
||||
run_checks(LINT_CONTENT_CHECKS, fname, fname, content)
|
||||
|
||||
run_checks(LINT_POST_CHECKS, "POST")
|
||||
run_checks(LINT_POST_CHECKS, Path("POST"))
|
||||
|
||||
for f, errs in sorted(errors.items()):
|
||||
bold = functools.partial(styled, colorama.Style.BRIGHT)
|
||||
|
||||
Reference in New Issue
Block a user