mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
lint fix
This commit is contained in:
parent
d14757e107
commit
01fff2c7a9
@ -120,7 +120,7 @@ class _SpiPhy(BasePhy): # pylint: disable=too-many-instance-attributes
|
||||
return os.path.exists(f"/dev/spidev{self.__bus}.{self.__chip}")
|
||||
|
||||
@contextlib.contextmanager
|
||||
def connected(self) -> Generator[_SpiPhyConnection, None, None]: # type: ignore
|
||||
def connected(self) -> Generator[_SpiPhyConnection, None, None]: # pylint: disable=contextmanager-generator-missing-cleanup # type: ignore
|
||||
with self.__sw_cs_connected() as switch_cs:
|
||||
with contextlib.closing(spidev.SpiDev(self.__bus, self.__chip)) as spi:
|
||||
spi.mode = 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user