Skip to content

Fixed logging checkstate error#207

Open
th-jyu wants to merge 3 commits intoshotgunsoftware:masterfrom
Treehouse-Digital:fix-shift-click-checkstate
Open

Fixed logging checkstate error#207
th-jyu wants to merge 3 commits intoshotgunsoftware:masterfrom
Treehouse-Digital:fix-shift-click-checkstate

Conversation

@th-jyu
Copy link
Copy Markdown
Contributor

@th-jyu th-jyu commented Feb 4, 2026

Super simple fix for broken Shift-Click on checkboxes to toggle all tasks from that plugin

image

i.e. as recently as v2.10.7, doing the above would have no effect and instead throw the error:

Traceback (most recent call last):
  File "/path/to/cloned/tk-multi-publish2/python/tk_multi_publish2/publish_tree_widget/custom_widget_task.py", line 63, in _on_checkbox_click
    self._tree_node.set_check_state(state, apply_to_all_plugins=True)
  File "/path/to/cloned/tk-multi-publish2/python/tk_multi_publish2/publish_tree_widget/tree_node_task.py", line 72, in set_check_state
    self.treeWidget().set_check_state_for_all_plugins(self._task.plugin, state)
  File "/path/to/cloned/tk-multi-publish2/python/tk_multi_publish2/publish_tree_widget/publish_tree_widget.py", line 475, in set_check_state_for_all_plugins
    logger.debug("Setting state %d for all plugin %s" % (state, plugin))
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
TypeError: %d format: a real number is required, not CheckState

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 40.48%. Comparing base (0e27293) to head (08f5073).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #207      +/-   ##
==========================================
+ Coverage   40.18%   40.48%   +0.29%     
==========================================
  Files          61       61              
  Lines        5027     5027              
==========================================
+ Hits         2020     2035      +15     
+ Misses       3007     2992      -15     
Flag Coverage Δ
Linux 40.48% <100.00%> (+0.29%) ⬆️
Python-3.10 40.48% <100.00%> (+0.29%) ⬆️
Python-3.11 40.48% <100.00%> (+0.29%) ⬆️
Python-3.13 40.48% <100.00%> (+0.29%) ⬆️
Python-3.9 40.48% <100.00%> (+0.29%) ⬆️
Windows 40.48% <100.00%> (+0.29%) ⬆️
macOS 40.48% <100.00%> (+0.29%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@th-jyu th-jyu force-pushed the fix-shift-click-checkstate branch 3 times, most recently from 47a482f to 6335039 Compare February 9, 2026 19:52
@th-jyu th-jyu force-pushed the fix-shift-click-checkstate branch from 6335039 to 08f5073 Compare April 8, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant