Commit 24b601e
parol6: fix _ToolsCollection membership + by_type for StrEnum ToolType
waldoctl's ToolType is now a StrEnum (category members are also str) and the
ToolsSpec.by_type ABC widened to `str | ToolType`:
- __contains__: test ToolType before the plain-str branch — otherwise
`ToolType.GRIPPER in tools` misrouted to the by-key lookup (keyed by tool
key, not category) and returned False. Safe under plain Enum and StrEnum.
- by_type: widen the parameter to `str | ToolType` to match the widened ABC
(LSP-safe against both the old and new base signatures).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 9da1bd2 commit 24b601e
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
407 | | - | |
408 | | - | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
409 | 410 | | |
410 | 411 | | |
| 412 | + | |
| 413 | + | |
411 | 414 | | |
412 | 415 | | |
413 | | - | |
| 416 | + | |
414 | 417 | | |
415 | 418 | | |
416 | 419 | | |
| |||
0 commit comments