From b7715b731ed84cce716b6e792bf09389912c4054 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Sat, 3 May 2025 04:27:21 +0300 Subject: [PATCH] lint fixes --- kvmd/apps/kvmd/switch/types.py | 2 +- testenv/linters/vulture-wl.py | 4 ++++ web/share/js/kvm/stream_media.js | 3 ++- web/share/js/kvm/switch.js | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/kvmd/apps/kvmd/switch/types.py b/kvmd/apps/kvmd/switch/types.py index 475ec30f..3d948eb3 100644 --- a/kvmd/apps/kvmd/switch/types.py +++ b/kvmd/apps/kvmd/switch/types.py @@ -281,7 +281,7 @@ class _PortsDict(Generic[_T]): else: self.kvs[port] = value - def __eq__(self, other: "_PortsDict[_T]") -> bool: + def __eq__(self, other: object) -> bool: if not isinstance(other, self.__class__): return False return (self.kvs == other.kvs) diff --git a/testenv/linters/vulture-wl.py b/testenv/linters/vulture-wl.py index 979ae4c8..ac4d9ec4 100644 --- a/testenv/linters/vulture-wl.py +++ b/testenv/linters/vulture-wl.py @@ -59,6 +59,7 @@ Dumper.ignore_aliases _auth_server_port_fixture _test_user +Switch.__x_set_dummies Switch.__x_set_port_names Switch.__x_set_atx_cp_delays Switch.__x_set_atx_cpl_delays @@ -69,16 +70,19 @@ Nak.NO_DOWNLINK Nak.DOWNLINK_OVERFLOW UnitFlags.flashing_busy UnitFlags.has_hpd +StateCache.get_dummies StateCache.get_port_names StateCache.get_atx_cp_delays StateCache.get_atx_cpl_delays StorageContext.write_edids +StorageContext.write_dummies StorageContext.write_colors StorageContext.write_port_names StorageContext.write_atx_cp_delays StorageContext.write_atx_cpl_delays StorageContext.write_atx_cr_delays StorageContext.read_edids +StorageContext.read_dummies StorageContext.read_colors StorageContext.read_port_names StorageContext.read_atx_cp_delays diff --git a/web/share/js/kvm/stream_media.js b/web/share/js/kvm/stream_media.js index 6f73993c..269929f1 100644 --- a/web/share/js/kvm/stream_media.js +++ b/web/share/js/kvm/stream_media.js @@ -241,7 +241,8 @@ export function MediaStreamer(__setActive, __setInactive, __setInfo, __orient) { if (__decoder !== null) { try { __decoder.close(); - } catch { // eslint-disable-line no-empty + } catch { + // Pass } finally { __decoder = null; __codec = ""; diff --git a/web/share/js/kvm/switch.js b/web/share/js/kvm/switch.js index 9d261cc4..46a4e1d1 100644 --- a/web/share/js/kvm/switch.js +++ b/web/share/js/kvm/switch.js @@ -486,7 +486,7 @@ export function Switch() {