Repository navigation
Conversation
`gpu_mem` and `gpu_proc` are selectable in `[quicklook] list=` but were never added to `items_history_list`, so `get_raw_history()` returns None for them. With --sparkline, `_msg_cpu` iterates over that None and the curses UI exits with "'NoneType' object is not iterable".
History is per plugin, not per displayed stat: a GPU entry keeps building history while list= omits it, exactly like swap today.
Owner
|
Thanks for the PR @askalf Merged into develop. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gpu_memandgpu_procare in quicklook'sAVAILABLE_STATS_LIST, so[quicklook] list=cpu,gpu_memis a valid config. But they were never added toitems_history_list, which means no history is kept for them.--sparkline(or theShotkey),_msg_cpubuilds each sparkline fromself.get_raw_history(item=key, ...). For a key with no history that returnsNone, and the list comprehension over it raisesTypeError: 'NoneType' object is not iterable, which exits the curses UI. This is standalone mode; the#1881client-mode path is already gated bynot self.args.client.items_history_listinglances/plugins/quicklook/__init__.py, in the same shape as the five existing ones.tests/test_plugin_quicklook.pyTestQuicklookGpuHistoryclass (3 parametrized functions x {gpu_mem, gpu_proc}). All 6 fail on base and pass with the fix.Decisions
The change uses the project’s existing implementation path and adds a focused regression test; broader unrelated behavior remains out of scope.
Not run: no checks beyond the staged PR evidence were run during submission.
AI assistance: this bug was found and the fix and tests were drafted with AI tooling in my workflow; the tests and checks above were executed as pasted. I'm responsible for the change and will handle review feedback.