textual
textual copied to clipboard
expect_type for get_child_by_id and get_widget_by_id
For #1237, adds an expect_type parameter to get_child_by_id and get_widget_by_id methods. I tried to mimic how this was done for query_one.
I also noticed Pylance was not happy with NodeList._get_by_id being protected so I made it public, apologies if this is an unwanted change.
- [x] Docstrings on all new or modified functions / classes
- [ ] Updated documentation
- [ ] Updated CHANGELOG.md (where appropriate)