Update pylint
A previous patch [1] changed tox environments to use python3 by default, which makes the pylint test fail. This patch updates the pylint package version and fixes pylint errors. [1] https://review.openstack.org/#/c/572948/ Change-Id: I93c4a0c6060960552cc914963f410188eac7f3f4
This commit is contained in:
parent
70a44bc7b3
commit
0c65190306
|
@ -161,7 +161,7 @@ def _merge_periods(reserved_periods, start_date, end_date, duration):
|
|||
"""Merge periods if the interval is too narrow."""
|
||||
reserved_start = None
|
||||
reserved_end = None
|
||||
previous = None
|
||||
previous = []
|
||||
merged_reserved_periods = []
|
||||
for period in reserved_periods:
|
||||
if not reserved_start:
|
||||
|
|
|
@ -776,8 +776,7 @@ class PhysicalHostMonitorPlugin(base.BaseMonitorPlugin,
|
|||
recovered_hosts = [host for host in unreservable_hosts
|
||||
if host['id'] in active_hv_ids]
|
||||
except Exception as e:
|
||||
LOG.exception('Skipping health check of host %s. %s',
|
||||
host['hypervisor_hostname'], str(e))
|
||||
LOG.exception('Skipping health check. %s', str(e))
|
||||
|
||||
return failed_hosts, recovered_hosts
|
||||
|
||||
|
|
|
@ -571,8 +571,8 @@ class BaseWalkMigrationTestCase(BaseMigrationTestCase):
|
|||
# the previous (higher numbered) migration.
|
||||
if with_data:
|
||||
post_downgrade = getattr(
|
||||
self, "_post_downgrade_%s" % next_version, None)
|
||||
if post_downgrade:
|
||||
self, "_post_downgrade_%s" % next_version, self._do_nothing)
|
||||
if post_downgrade is not self._do_nothing:
|
||||
post_downgrade(engine)
|
||||
|
||||
return True
|
||||
|
@ -604,3 +604,11 @@ class BaseWalkMigrationTestCase(BaseMigrationTestCase):
|
|||
LOG.error("Failed to migrate to version %(version)s on engine "
|
||||
"%(engine)s", {'version': version, 'engine': engine})
|
||||
raise
|
||||
|
||||
def _do_nothing(self, *args, **kwargs):
|
||||
"""Workaround for passing the pylint check.
|
||||
|
||||
NOTE(hiro-kobayashi): this method is used by the _migrate_down() to
|
||||
prevent 'not-callable' error of the pylint checker.
|
||||
"""
|
||||
pass
|
||||
|
|
|
@ -76,7 +76,7 @@ pycadf==2.7.0
|
|||
pyflakes==0.8.1
|
||||
Pygments==2.2.0
|
||||
pyinotify==0.9.6
|
||||
pylint==1.4.5
|
||||
pylint==1.9.1
|
||||
pyparsing==2.2.0
|
||||
python-dateutil==2.7.0
|
||||
python-editor==1.0.3
|
||||
|
|
|
@ -6,7 +6,7 @@ pbr!=2.1.0,>=2.0.0 # Apache-2.0
|
|||
alembic>=0.8.10 # MIT
|
||||
Babel!=2.4.0,>=2.3.4 # BSD
|
||||
eventlet!=0.18.3,!=0.20.1,>=0.18.2 # MIT
|
||||
Flask!=0.11,<1.0,>=0.10 # BSD
|
||||
Flask!=0.11,>=0.10 # BSD
|
||||
iso8601>=0.1.11 # MIT
|
||||
keystonemiddleware>=4.17.0 # Apache-2.0
|
||||
kombu!=4.0.2,>=4.0.0 # BSD
|
||||
|
|
|
@ -10,7 +10,7 @@ testrepository>=0.0.18 # Apache-2.0/BSD
|
|||
testscenarios>=0.4 # Apache-2.0/BSD
|
||||
testtools>=2.2.0 # MIT
|
||||
coverage!=4.4,>=4.0 # Apache-2.0
|
||||
pylint==1.4.5 # GPLv2
|
||||
pylint>=1.9.1 # GPLv2
|
||||
oslotest>=3.2.0 # Apache-2.0
|
||||
oslo.context>=2.19.2 # Apache-2.0
|
||||
|
||||
|
|
Loading…
Reference in New Issue