-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add docstrings and enable linting
Also rename some functions for clarity. Signed-off-by: Felix Kaechele <felix@kaechele.ca>
- Loading branch information
Showing
13 changed files
with
158 additions
and
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
"""The Bonaparte Library.""" | ||
from __future__ import annotations | ||
|
||
__version__ = "0.1.0" | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,30 @@ | ||
"""Exceptions used in the Bonaparte library.""" | ||
from __future__ import annotations | ||
|
||
|
||
class EfireException(Exception): # noqa: N818 | ||
pass | ||
"""Generic eFIRE device exception.""" | ||
|
||
|
||
class AuthError(EfireException): | ||
pass | ||
"""For when authentication fails.""" | ||
|
||
|
||
class CommandFailedException(EfireException): | ||
pass | ||
"""For when a command returns a failure.""" | ||
|
||
|
||
class DisconnectedException(EfireException): | ||
pass | ||
"""For when the device is disconnected and we try to use it.""" | ||
|
||
|
||
class FeatureNotSupported(EfireException): | ||
pass | ||
|
||
|
||
class ResponseError(EfireException): | ||
pass | ||
"""For when a feature is accessed that the device is not set up for.""" | ||
|
||
|
||
class EfireMessageValueError(ValueError): | ||
pass | ||
"""For when an invalid message is received or generated.""" | ||
|
||
|
||
class CharacteristicMissingError(EfireException): | ||
pass | ||
"""For when a required BLE GATT characteristic is missing.""" |
Oops, something went wrong.