mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
lint fixes
This commit is contained in:
parent
59ba330ef8
commit
99e4615d38
@ -148,8 +148,7 @@ class Plugin(BaseUserGpioDriver): # pylint: disable=too-many-instance-attribute
|
|||||||
except Exception as err:
|
except Exception as err:
|
||||||
get_logger().error("Failed ANELPWR POST request to pin %s: %s", pin, tools.efmt(err))
|
get_logger().error("Failed ANELPWR POST request to pin %s: %s", pin, tools.efmt(err))
|
||||||
raise GpioDriverOfflineError(self)
|
raise GpioDriverOfflineError(self)
|
||||||
else:
|
self.__update_notifier.notify()
|
||||||
self.__update_notifier.notify()
|
|
||||||
|
|
||||||
def __ensure_http_session(self) -> aiohttp.ClientSession:
|
def __ensure_http_session(self) -> aiohttp.ClientSession:
|
||||||
if not self.__http_session:
|
if not self.__http_session:
|
||||||
|
|||||||
@ -145,8 +145,7 @@ class Plugin(BaseUserGpioDriver): # pylint: disable=too-many-instance-attribute
|
|||||||
except Exception as err:
|
except Exception as err:
|
||||||
get_logger().error("Failed Hue PUT request to pin %s: %s", pin, tools.efmt(err))
|
get_logger().error("Failed Hue PUT request to pin %s: %s", pin, tools.efmt(err))
|
||||||
raise GpioDriverOfflineError(self)
|
raise GpioDriverOfflineError(self)
|
||||||
else:
|
self.__update_notifier.notify()
|
||||||
self.__update_notifier.notify()
|
|
||||||
|
|
||||||
def __ensure_http_session(self) -> aiohttp.ClientSession:
|
def __ensure_http_session(self) -> aiohttp.ClientSession:
|
||||||
if not self.__http_session:
|
if not self.__http_session:
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[MASTER]
|
[MASTER]
|
||||||
ignore = .git
|
ignore = .git
|
||||||
extension-pkg-whitelist =
|
extension-pkg-whitelist =
|
||||||
setproctitle,
|
setproctitle,
|
||||||
gpiod,
|
gpiod,
|
||||||
spidev,
|
spidev,
|
||||||
@ -35,6 +35,8 @@ disable =
|
|||||||
unsubscriptable-object,
|
unsubscriptable-object,
|
||||||
unused-private-member,
|
unused-private-member,
|
||||||
unspecified-encoding,
|
unspecified-encoding,
|
||||||
|
consider-using-f-string,
|
||||||
|
unnecessary-lambda-assignment,
|
||||||
# https://github.com/PyCQA/pylint/issues/3882
|
# https://github.com/PyCQA/pylint/issues/3882
|
||||||
|
|
||||||
[CLASSES]
|
[CLASSES]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user