Skip to content

Commit

Permalink
Merge pull request #427 from martin-belanger/latest-pylint
Browse files Browse the repository at this point in the history
test: Allow running latest pylint instead of old 2.17.7 version
  • Loading branch information
martin-belanger committed Apr 29, 2024
2 parents 7d34f59 + cf7de7b commit b9c547c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/meson-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions staslib/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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.'''
Expand Down Expand Up @@ -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):
Expand Down
6 changes: 0 additions & 6 deletions test/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b9c547c

Please sign in to comment.