1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-16 23:47:10 +02:00

tweak for bot

This commit is contained in:
J. Nick Koston 2025-10-11 11:25:19 -10:00
parent 81b7f41dd5
commit 5e1848854e
No known key found for this signature in database
2 changed files with 4 additions and 1 deletions

View File

@ -246,6 +246,9 @@ std::string make_name_with_suffix(const std::string &name, char sep, const std::
// Silently truncate if needed: prioritize keeping the full suffix
if (total_len >= MAX_NAME_WITH_SUFFIX_SIZE) {
// NOTE: This calculation could underflow if suffix_len >= MAX_NAME_WITH_SUFFIX_SIZE - 2,
// but this is safe because this helper is only called with small suffixes:
// MAC suffixes (6-12 bytes), ".local" (6 bytes), etc.
name_len = MAX_NAME_WITH_SUFFIX_SIZE - suffix_len - 2; // -2 for separator and null terminator
total_len = name_len + 1 + suffix_len;
}

View File

@ -244,7 +244,7 @@ def main() -> None:
component
for component in changed_components
if (component_test_dir := tests_dir / component).exists()
and any(component_test_dir.glob("test.*.yaml"))
and next(component_test_dir.glob("test.*.yaml"), None) is not None
]
# Build output