-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify API to allow granular reader operation
In response to [^1]. Previously it was hard to operate the reader classes from calling code that separates resource management ("open" / "close") and the actual polling of data ("read_one"). This exposes new APIs to make it easier to use reader classes in such a granular way. Implementation notes: - Reinstating a type hint for __enter__ of "-> Self" will become possible in Python 3.11. - "start" / "stop" were discussed in relation to the Sensor being operated by a SensorReader, but these concepts don't make much sense for the MessageReader class, so I've used "open" / "close" instead. [^1]: #32 (comment)
- Loading branch information
1 parent
401863e
commit 820d267
Showing
2 changed files
with
22 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters