mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-10-05 23:05:10 +00:00
refactor(scroll): no assert in _extended_strip
An assert vanishes under python -O (Codacy); a real check says the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -752,7 +752,9 @@ class ScrollHelper:
|
|||||||
def _extended_strip(self, addition: np.ndarray) -> np.ndarray:
|
def _extended_strip(self, addition: np.ndarray) -> np.ndarray:
|
||||||
"""The strip with ``addition`` after it, written in place when it fits."""
|
"""The strip with ``addition`` after it, written in place when it fits."""
|
||||||
live = self.cached_array
|
live = self.cached_array
|
||||||
assert live is not None
|
if live is None:
|
||||||
|
# append_content builds a first strip itself and never comes here.
|
||||||
|
raise RuntimeError("no strip to extend")
|
||||||
width = live.shape[1]
|
width = live.shape[1]
|
||||||
added = addition.shape[1]
|
added = addition.shape[1]
|
||||||
buffer = self._strip_buffer
|
buffer = self._strip_buffer
|
||||||
|
|||||||
Reference in New Issue
Block a user