Skip to content

Commit b9c547c

Browse files
Merge pull request #427 from martin-belanger/latest-pylint
test: Allow running latest pylint instead of old 2.17.7 version
2 parents 7d34f59 + cf7de7b commit b9c547c

4 files changed

Lines changed: 8 additions & 11 deletions

File tree

.github/workflows/meson-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: |
2727
sudo apt-get install --yes --quiet docbook-xml docbook-xsl xsltproc libglib2.0-dev libgirepository1.0-dev libsystemd-dev
2828
sudo apt-get install --yes --quiet python3-systemd python3-pyudev python3-lxml
29-
python3 -m pip install --upgrade dasbus pylint==2.17.7 pyflakes PyGObject
29+
python3 -m pip install --upgrade dasbus pylint pyflakes PyGObject
3030
python3 -m pip install --upgrade vermin pyfakefs importlib-resources
3131
3232
- name: "INSTALL: libnvme dependencies"

.github/workflows/pylint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
sudo apt update
4343
sudo apt-get install --yes --quiet python3-pip cmake libgirepository1.0-dev libsystemd-dev python3-systemd swig libjson-c-dev || true
4444
sudo python3 -m pip install --upgrade pip wheel meson ninja
45-
python3 -m pip install --upgrade dasbus pylint==2.17.7 pyflakes PyGObject lxml pyudev
45+
python3 -m pip install --upgrade dasbus pylint pyflakes PyGObject lxml pyudev
4646
4747
- name: "BUILD: [libnvme, nvme-stas]"
4848
uses: BSFishy/[email protected]

staslib/conf.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,6 @@ def get_option(self, section, option, ignore_default=False): # pylint: disable=
289289
nr_write_queues = property(functools.partial(get_option, section='Global', option='nr-write-queues'))
290290
reconnect_delay = property(functools.partial(get_option, section='Global', option='reconnect-delay'))
291291

292-
zeroconf_enabled = property(functools.partial(get_option, section='Service Discovery', option='zeroconf'))
293-
294292
zeroconf_persistence_sec = property(
295293
functools.partial(
296294
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=
307305
functools.partial(get_option, section='I/O controller connection management', option='connect-attempts-on-ncc')
308306
)
309307

308+
@property # pylint chokes on this when defined as zeroconf_enabled=property(...). Works fine using a decorator...
309+
def zeroconf_enabled(self):
310+
'''Return whether zeroconf is enabled'''
311+
return self.get_option(section='Service Discovery', option='zeroconf')
312+
310313
@property
311314
def stypes(self):
312315
'''@brief Get the DNS-SD/mDNS service types.'''
@@ -707,7 +710,7 @@ def dhchap_ctrlkey_supp(self):
707710

708711

709712
# ******************************************************************************
710-
class NbftConf(metaclass=singleton.Singleton):
713+
class NbftConf(metaclass=singleton.Singleton): # pylint: disable=too-few-public-methods
711714
'''Read and cache configuration file.'''
712715

713716
def __init__(self, root_dir=defs.NBFT_SYSFS_PATH):

test/meson.build

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@ if libnvme_location == '?'
4848
else
4949
#---------------------------------------------------------------------------
5050
# pylint and pyflakes
51-
52-
# There's a bug with pylint 3.X. Tests should be run with pylint
53-
# 2.17.7 (or less), which can be installed with:
54-
# python3 -m pip install --upgrade pylint==2.17.7
55-
56-
5751
if test_list.length() != 0
5852
pylint = find_program('pylint', required: false)
5953
pyflakes = find_program('pyflakes3', required: false)

0 commit comments

Comments
 (0)