A structurally corrupt memory_types warns as malformed instead of
posing as a variant without the region; csv.Error joins the
broken-table warning arm; the blanket's visible record carries the
exception type. The malformed-cell test parametrizes over blank and
non-blank junk, the missing-report test pins its warning, and the
quiet path asserts its debug record exists with no warning records.
_flash_line validates image_size and returns the formatted line, so
nothing after a print can raise and the line buffer, the image_size
double-lookup, and the blanket's one known trigger all dissolve; the
blanket keeps its charter (a test now drives it with a patched raise).
_find_app_partition_size returns None for legitimate absence and
reserves raises for a present-but-broken table, dissolving the
_MalformedPartitionRow subclass and the except-ordering it relied on;
run_compile passes the table path unconditionally so the module owns
the whole policy. The is_file pre-check folds into the OSError arm,
the dead or-{} is gone, and the tests share _dram_size_data and
_write_partitions instead of repeating payload literals.
Skips caused by the build's own outputs (missing/unparsable/misshapen
size report, absent RAM region, broken-but-present partition table via
a typed _MalformedPartitionRow) log at warning; only the legitimately
quiet cases (no table given, no qualifying partition) stay at debug.
The report is buffered so a late failure prints nothing instead of half
a report. The blank-cell test now asserts the logged row and path, so
reverting the ValueError fails it (mutation-checked), and the nested-
shape tests assert the named guard fired rather than the blanket.
The blanket backstop and the zero-partition skip log at warning naming
their input, so a regression or broken table is visible where the
missing line is observed, with the traceback at debug. The blank-cell
ValueError carries the partition and csv path, and the blanket test
asserts no half-formed bar prints instead of a vacuous Traceback check.
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Bluetooth Devices Bot <bluetooth@koston.org>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
Co-authored-by: J. Nick Koston <nick@koston.org>