Private
Public Access
0
0

fix(md_renderer_py): use Style.color_(Col_.X) API for imgui-bundle 1.92.5

The imgui-bundle 1.92.5 API changed:
  OLD: imgui.get_style().colors[imgui.Col_.text]
  NEW: imgui.get_style().color_(imgui.Col_.text)

The Style object no longer has a 'colors' dict; it has a 'color_'
method that takes a Col_ enum and returns the ImVec4 color.

Updated all 9 call sites in md_renderer_py.py and the test mocks
in test_md_renderer_py.py, test_markdown_helper_bullets.py, and
test_markdown_render_robust.py.

42/42 tests pass.
This commit is contained in:
Conductor
2026-06-03 23:06:05 -04:00
parent 3117061be5
commit 2d1d37779f
4 changed files with 12 additions and 19 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ def _mock_imgui(mock_imgui):
mock_imgui.pop_font = MagicMock()
mock_imgui.small_button = MagicMock()
mock_imgui.get_style = MagicMock(return_value=MagicMock(
colors={i: MagicMock(x=1, y=1, z=1, w=1) for i in range(6)}
color_=MagicMock(side_effect=lambda col: MagicMock(x=1, y=1, z=1, w=1))
))
mock_imgui.get_io = MagicMock(return_value=MagicMock(fonts=MagicMock(fonts=[None])))
mock_imgui.calc_text_size = MagicMock(return_value=MagicMock(x=50, y=20))