python-banshee
python-banshee copied to clipboard
feat: add return type for queries
Description
Adds a generic Query
type that can be extended to define the return type of dispatching the query.
Fixes #99
Motivation and Context
The current Any
response has a type does not allow static analysis of the returned value.
How Has This Been Tested?
Manually tested with mypy and vscode type inference (pyright) to check desired type is infered, defaulting to Any
.
Screenshots:
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
- [x] My code follows the code style of this project.
- [x] My change requires a change to the documentation.
- [x] I have updated the documentation accordingly.
- [x] I have read the CONTRIBUTING.md document.
- [x] I have added tests to cover my changes.
- [x] All new and existing tests passed.