diff options
author | Maxim Devaev <[email protected]> | 2021-10-01 15:37:52 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2021-10-02 01:47:20 +0300 |
commit | c162bb7ea4f4edea29be03b89258c8c1a562c49e (patch) | |
tree | f27f56cd0ae197fc8699cd9ca16c666caab94b75 /kvmd | |
parent | 2f92e95bf05f845b768d62750b07103f07b095f8 (diff) |
style fixes
Diffstat (limited to 'kvmd')
-rw-r--r-- | kvmd/plugins/ugpio/xh_hk4401.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kvmd/plugins/ugpio/xh_hk4401.py b/kvmd/plugins/ugpio/xh_hk4401.py index d12f0290..58b5a038 100644 --- a/kvmd/plugins/ugpio/xh_hk4401.py +++ b/kvmd/plugins/ugpio/xh_hk4401.py @@ -174,7 +174,7 @@ class Plugin(BaseUserGpioDriver): # pylint: disable=too-many-instance-attribute if found: try: - channel = int(found[-1][2:4])-1 + channel = int(found[-1][2:4]) - 1 except Exception: return (None, data) assert 0 <= channel <= 3 @@ -182,11 +182,11 @@ class Plugin(BaseUserGpioDriver): # pylint: disable=too-many-instance-attribute def __send_channel(self, tty: serial.Serial, channel: int) -> None: assert 0 <= channel <= 3 - cmd = "SW{port}\r\nAG{port:02d}gA".format(port=channel+1).encode() + cmd = "SW{port}\r\nAG{port:02d}gA".format(port=(channel + 1)).encode() tty.write(cmd) tty.flush() def __str__(self) -> str: - return f"Xh_hk4401({self._instance_name})" + return f"XH-HK4401({self._instance_name})" __repr__ = __str__ |