Coverage for paintmaskanimator/_color_panel_members.py: 100%

4 statements  

« prev     ^ index     » next       coverage.py v7.17.0, created at 2026-11-02 04:50 +0000

1"""Type-only member declarations shared across the used-color panel mixins. 

2 

3This module exists purely to give pyright/pylance the attributes, methods and 

4signals really provided at runtime by the composed ``UsedColorPanel`` class (and 

5its Qt base). Each mixin lives in its own file, so a checker inspecting one mixin 

6in isolation cannot see members defined on its siblings or set in 

7``UsedColorPanel.__init__``; without these stubs every such access was reported 

8as ``reportAttributeAccessIssue``. 

9 

10At runtime ``UsedColorPanelMembers`` is an empty ``object`` subclass, so mixing 

11it in is harmless. Under ``TYPE_CHECKING`` it inherits the real Qt base, so Qt 

12methods resolve too. A genuinely undefined name -- a typo or a removed 

13attribute -- still surfaces, because it never appears in this list. 

14 

15Entries are being migrated from ``Any`` to their real types; every one that 

16moves off ``Any`` starts type-checking its own call sites, so prefer adding a 

17precise type here over widening one. ``Any`` remains the default for the many 

18method stubs, whose signatures live with the mixin that defines them. 

19""" 

20from __future__ import annotations 

21 

22from typing import TYPE_CHECKING, Any 

23 

24if TYPE_CHECKING: 

25 from PySide6.QtCore import Signal 

26 from PySide6.QtWidgets import QWidget 

27 _MembersBase = QWidget 

28else: 

29 _MembersBase = object 

30 

31 

32class UsedColorPanelMembers(_MembersBase): 

33 if TYPE_CHECKING: 

34 adjustLineThicknessRequested: Signal 

35 adjustHsvRequested: Signal 

36 applyReplacementRequested: Signal 

37 saveReplacementSetRequested: Signal 

38 loadReplacementSetRequested: Signal 

39 clearIsolateRequested: Signal 

40 deleteColorsRequested: Signal 

41 focusColorRequested: Signal 

42 historyStatePush: Signal 

43 isolateColorClicked: Signal 

44 mainColorRequested: Signal 

45 maskColorsChanged: Signal 

46 mergeColorsRequested: Signal 

47 previewGroupsChanged: Signal 

48 selectedColorsChanged: Signal 

49 sourceScreenColorPicked: Signal 

50 visibleColorsChanged: Signal 

51 add_color: Any 

52 all_masks_enabled: Any 

53 _append_color_row: Any 

54 apply_button: Any 

55 _apply_selection_state: Any 

56 _apply_swatch_text: Any 

57 background_rgb: Any 

58 _begin_mask_sweep: Any 

59 _begin_selection_sweep: Any 

60 _begin_visibility_sweep: Any 

61 capture_history_state: Any 

62 category_collapsed: Any 

63 category_colors: Any 

64 category_order: Any 

65 category_widgets: Any 

66 _checkbox_rgb_at_global: Any 

67 child_to_parent: Any 

68 child_tags: Any 

69 parent_tags: Any 

70 tag_library: Any 

71 tag_colors: Any 

72 tag_order: Any 

73 _clear_groups: Any 

74 _clear_mask_colors: Any 

75 _clear_replacement: Any 

76 clear_masks_button: Any 

77 _clear_rows: Any 

78 clear_categories: Any 

79 clear_selection_button: Any 

80 _clear_used_color_selection: Any 

81 _color_index: Any 

82 colors: Any 

83 content: Any 

84 count_label: Any 

85 _disable_other_masks: Any 

86 _disable_other_visible_colors: Any 

87 _drop_group_links_for: Any 

88 _drop_group_links_outside_parent_blocks: Any 

89 _merge_selected_into: Any 

90 _refresh_merge_button: Any 

91 _mergeable_selection: Any 

92 _emit_mask_state: Any 

93 _emit_merge: Any 

94 _emit_preview: Any 

95 _emit_replacements: Any 

96 enabled_colors: Any 

97 enabled_rgb_set: Any 

98 _end_mask_sweep: Any 

99 _end_selection_sweep: Any 

100 _end_visibility_sweep: Any 

101 merge_button: Any 

102 _group_line_color: Any 

103 _group_mapping: Any 

104 _group_root: Any 

105 _handle_color_drop: Any 

106 _history_edit: Any 

107 _history_significant: Any 

108 _history_suspended: Any 

109 _category_members: Any 

110 _refresh_category_headers: Any 

111 _sync_category_headers: Any 

112 _hovered_rgb: Any 

113 _isolate_mask_color: Any 

114 _isolate_visible_color: Any 

115 _isolated_rgb: Any 

116 _make_child_of: Any 

117 _make_source_wrapper: Any 

118 _mask_all_mode: Any 

119 _mask_alt_rgb: Any 

120 _mask_checkbox_rgb_at_global: Any 

121 mask_checks: Any 

122 mask_rgbs: Any 

123 _mask_sweep_active: Any 

124 _mask_sweep_changed: Any 

125 _mask_sweep_state: Any 

126 _mask_sweep_touched: Any 

127 _move_mask_sweep: Any 

128 _move_selection_sweep: Any 

129 _move_visibility_sweep: Any 

130 _normalize_groups: Any 

131 _normalized_colors: Any 

132 _on_selection_check_toggled: Any 

133 _on_swatch_hover: Any 

134 _ordered_non_background_rgbs: Any 

135 parent_rgb: Any 

136 _pre_isolate_enabled: Any 

137 _pre_mask_alt: Any 

138 _reapply_row_order: Any 

139 _record_history: Any 

140 register_replacements: Any 

141 replacement_buttons: Any 

142 replacements: Any 

143 _refresh_all_group_displays: Any 

144 _refresh_group_display: Any 

145 _refresh_used_color_styles: Any 

146 _remove_color_row: Any 

147 _reorder_children_under_parents: Any 

148 _reorder_color: Any 

149 _reorder_color_block: Any 

150 _reorder_parent_group: Any 

151 restore_history_state: Any 

152 _retain_parent_selection: Any 

153 _rgb_key: Any 

154 row_widgets: Any 

155 rows: Any 

156 scroll: Any 

157 select_matching_color: Any 

158 _select_single_used_color: Any 

159 _select_used_color: Any 

160 selected_rgb_set: Any 

161 selected_rgbs: Any 

162 _selection_anchor_rgb: Any 

163 _selection_check_rgb_at_global: Any 

164 selection_checks: Any 

165 _selection_sweep_active: Any 

166 _selection_sweep_changed: Any 

167 _selection_sweep_state: Any 

168 _selection_sweep_touched: Any 

169 _set_all_masks_on: Any 

170 _set_checkbox_without_signal: Any 

171 _set_color_visible: Any 

172 set_colors: Any 

173 _set_mask_checkbox_without_signal: Any 

174 _set_mask_color: Any 

175 _set_replacement_button_style: Any 

176 _set_replacement_color: Any 

177 _set_single_mask_state: Any 

178 _set_source_button_style: Any 

179 _set_used_color_parent: Any 

180 _set_visibility_state: Any 

181 show_all_button: Any 

182 _show_all_colors: Any 

183 _show_mask_context_menu: Any 

184 _show_used_color_context_menu: Any 

185 _show_visibility_context_menu: Any 

186 source_buttons: Any 

187 source_wrappers: Any 

188 _sweep_history_before: Any 

189 _sync_selection_check: Any 

190 _text_color: Any 

191 _toggle_used_color_selection: Any 

192 visibility_checks: Any 

193 _visibility_sweep_active: Any 

194 _visibility_sweep_changed: Any 

195 _visibility_sweep_state: Any 

196 _visibility_sweep_touched: Any