diff --git a/.github/workflows/meson-test.yml b/.github/workflows/meson-test.yml index 356b0b5..d8e2352 100644 --- a/.github/workflows/meson-test.yml +++ b/.github/workflows/meson-test.yml @@ -26,7 +26,7 @@ jobs: run: | sudo apt-get install --yes --quiet docbook-xml docbook-xsl xsltproc libglib2.0-dev libgirepository1.0-dev libsystemd-dev sudo apt-get install --yes --quiet python3-systemd python3-pyudev python3-lxml - python3 -m pip install --upgrade dasbus pylint==2.17.7 pyflakes PyGObject + python3 -m pip install --upgrade dasbus pylint pyflakes PyGObject python3 -m pip install --upgrade vermin pyfakefs importlib-resources - name: "INSTALL: libnvme dependencies" diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index b0a40f3..a87b0e1 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -42,7 +42,7 @@ jobs: sudo apt update sudo apt-get install --yes --quiet python3-pip cmake libgirepository1.0-dev libsystemd-dev python3-systemd swig libjson-c-dev || true sudo python3 -m pip install --upgrade pip wheel meson ninja - python3 -m pip install --upgrade dasbus pylint==2.17.7 pyflakes PyGObject lxml pyudev + python3 -m pip install --upgrade dasbus pylint pyflakes PyGObject lxml pyudev - name: "BUILD: [libnvme, nvme-stas]" uses: BSFishy/meson-build@v1.0.3 diff --git a/staslib/conf.py b/staslib/conf.py index 4dd411c..053c5e9 100644 --- a/staslib/conf.py +++ b/staslib/conf.py @@ -289,8 +289,6 @@ def get_option(self, section, option, ignore_default=False): # pylint: disable= nr_write_queues = property(functools.partial(get_option, section='Global', option='nr-write-queues')) reconnect_delay = property(functools.partial(get_option, section='Global', option='reconnect-delay')) - zeroconf_enabled = property(functools.partial(get_option, section='Service Discovery', option='zeroconf')) - zeroconf_persistence_sec = property( functools.partial( get_option, section='Discovery controller connection management', option='zeroconf-connections-persistence' @@ -307,6 +305,11 @@ def get_option(self, section, option, ignore_default=False): # pylint: disable= functools.partial(get_option, section='I/O controller connection management', option='connect-attempts-on-ncc') ) + @property # pylint chokes on this when defined as zeroconf_enabled=property(...). Works fine using a decorator... + def zeroconf_enabled(self): + '''Return whether zeroconf is enabled''' + return self.get_option(section='Service Discovery', option='zeroconf') + @property def stypes(self): '''@brief Get the DNS-SD/mDNS service types.''' @@ -707,7 +710,7 @@ def dhchap_ctrlkey_supp(self): # ****************************************************************************** -class NbftConf(metaclass=singleton.Singleton): +class NbftConf(metaclass=singleton.Singleton): # pylint: disable=too-few-public-methods '''Read and cache configuration file.''' def __init__(self, root_dir=defs.NBFT_SYSFS_PATH): diff --git a/test/meson.build b/test/meson.build index ef1ce45..31068b2 100644 --- a/test/meson.build +++ b/test/meson.build @@ -48,12 +48,6 @@ if libnvme_location == '?' else #--------------------------------------------------------------------------- # pylint and pyflakes - - # There's a bug with pylint 3.X. Tests should be run with pylint - # 2.17.7 (or less), which can be installed with: - # python3 -m pip install --upgrade pylint==2.17.7 - - if test_list.length() != 0 pylint = find_program('pylint', required: false) pyflakes = find_program('pyflakes3', required: false)