labgrid
labgrid copied to clipboard
ConsoleProtocol: Update Signatures to match ConsoleExpectMixin
Description
The ConsoleExpectMixin has learned some new tricks over time. But the ConsoleProtocol was not updated accordingly.
Every class implementing the ConsoleProtocol also uses the ConsoleExpectMixin - so it's safe to update the signatures according to the ConsoleExpectMixin.
For ConsoleProtocol.expect() I've used the type definition of the underlying pexpect library.
I have not updated the return types, since it's not clear to me what the ConsoleExpectMixin should return.
This helps users with IDEs to get better type hinting when using the ConsoleProtocol.
Checklist
- [ ] Documentation for the feature
- [ ] Tests for the feature
- [ ] The arguments and description in doc/configuration.rst have been updated
- [ ] Add a section on how to use the feature to doc/usage.rst
- [ ] Add a section on how to use the feature to doc/development.rst
- [ ] PR has been tested
- [ ] Man pages have been regenerated