mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
lint fix
This commit is contained in:
@@ -120,8 +120,8 @@ 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]: # pylint: disable=contextmanager-generator-missing-cleanup # type: ignore
|
||||
with self.__sw_cs_connected() as switch_cs:
|
||||
def connected(self) -> Generator[_SpiPhyConnection, None, None]: # type: ignore
|
||||
with self.__sw_cs_connected() as switch_cs: # pylint: disable=contextmanager-generator-missing-cleanup
|
||||
with contextlib.closing(spidev.SpiDev(self.__bus, self.__chip)) as spi:
|
||||
spi.mode = 0
|
||||
spi.no_cs = (not self.__hw_cs)
|
||||
|
||||
Reference in New Issue
Block a user