(mod)
| 561 | self.mods = [mod for mod in fit.modules if mod is not None] |
| 562 | |
| 563 | def _get_sort_key(mod): |
| 564 | slot = getattr(mod, "slot", None) |
| 565 | try: |
| 566 | slot_index = slotOrder.index(slot) |
| 567 | except ValueError: |
| 568 | # During rapid fit switches we may briefly see transient modules |
| 569 | # with unresolved slot references; keep UI stable by sorting them last. |
| 570 | slot_index = len(slotOrder) |
| 571 | return slot_index, getattr(mod, "position", 0) |
| 572 | |
| 573 | self.mods.sort(key=_get_sort_key) |
| 574 |
nothing calls this directly
no outgoing calls
no test coverage detected