-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DecodingInterpreter and EncodingInterpreter #91
Conversation
Codecov Report
@@ Coverage Diff @@
## master #91 +/- ##
==========================================
+ Coverage 98.56% 98.58% +0.01%
==========================================
Files 67 68 +1
Lines 2097 2120 +23
==========================================
+ Hits 2067 2090 +23
Misses 30 30
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
async def handle( | ||
self, adapter: Adapter, message: AnyStr | ||
) -> Tuple[AsyncIterable[AnyStr], bool]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be typed as:
async def handle( | |
self, adapter: Adapter, message: AnyStr | |
) -> Tuple[AsyncIterable[AnyStr], bool]: | |
async def handle( | |
self, adapter: Adapter, message: bytes | |
) -> Tuple[AsyncIterable[str], bool]: |
Though it may require us to use a contravarient version of AnyStr
in the Interpreter
definition
async def handle( | ||
self, adapter: Adapter, message: AnyStr | ||
) -> Tuple[AsyncIterable[AnyStr], bool]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be typed as:
async def handle( | |
self, adapter: Adapter, message: AnyStr | |
) -> Tuple[AsyncIterable[AnyStr], bool]: | |
async def handle( | |
self, adapter: Adapter, message: str | |
) -> Tuple[AsyncIterable[bytes], bool]: |
Though it may require us to use a contravarient version of AnyStr
in the Interpreter
definition
Closing this as not planned. When it becomes desired again raise a new issue, linked to this #177. |
Adds interpreter wrappers that decode/encode messages before passing them on to the wrapped interpreter. This should facilitate the removal of encoding/decoding logic from within
RegexCommand
.