Fix all pep8 E265 errors
Fixed all pep8 E265 errors and changed tox.ini to no longer ignore them. Also removed an N536 comment missed from a previous change. Change-Id: Ie6db8406c3b884c95b2a54a7598ea83476b8dba1
This commit is contained in:
parent
0aeccc5500
commit
c3b83a9ca6
|
@ -187,8 +187,8 @@ class EmbSwitch(object):
|
|||
@param rate_kbps: device rate in kbps
|
||||
"""
|
||||
vf_index = self._get_vf_index(pci_slot)
|
||||
#NOTE(ralonsoh): ip link sets rate in Mbps therefore we need to convert
|
||||
#the rate_kbps value from kbps to Mbps.
|
||||
# NOTE(ralonsoh): ip link sets rate in Mbps therefore we need to
|
||||
# convert the rate_kbps value from kbps to Mbps.
|
||||
# Zero means to disable the rate so the lowest rate available is 1Mbps.
|
||||
# Floating numbers are not allowed
|
||||
if rate_kbps > 0 and rate_kbps < 1000:
|
||||
|
@ -441,11 +441,11 @@ class ESwitchManager(object):
|
|||
@param pci_slot: VF PCI slot
|
||||
@param rate_type: rate to clear ('rate', 'min_tx_rate')
|
||||
"""
|
||||
#NOTE(Moshe Levi): we don't use the self._get_emb_eswitch here, because
|
||||
#when clearing the VF it may be not assigned. This happens when
|
||||
#libvirt releases the VF back to the hypervisor on delete VM. Therefore
|
||||
#we should just clear the VF rate according to pci_slot no matter
|
||||
#if VF is assigned or not.
|
||||
# NOTE(Moshe Levi): we don't use the self._get_emb_eswitch here,
|
||||
# because when clearing the VF it may be not assigned. This happens
|
||||
# when libvirt releases the VF back to the hypervisor on delete VM.
|
||||
# Therefore we should just clear the VF rate according to pci_slot no
|
||||
# matter if VF is assigned or not.
|
||||
embedded_switch = self.pci_slot_map.get(pci_slot)
|
||||
if embedded_switch:
|
||||
# NOTE(Moshe Levi): check the pci_slot is not assigned to some
|
||||
|
|
5
tox.ini
5
tox.ini
|
@ -138,15 +138,14 @@ commands = sphinx-build -W -b linkcheck doc/source doc/build/linkcheck
|
|||
# E126 continuation line over-indented for hanging indent
|
||||
# E128 continuation line under-indented for visual indent
|
||||
# E129 visually indented line with same indent as next logical line
|
||||
# E265 block comment should start with '# '
|
||||
# H404 multi line docstring should start with a summary
|
||||
# H405 multi line docstring summary not separated with an empty line
|
||||
# N530 direct neutron imports not allowed
|
||||
# TODO(ihrachys) figure out what to do with N534 and N536
|
||||
# TODO(ihrachys) figure out what to do with N534
|
||||
# N534 Untranslated exception message
|
||||
# TODO(amotoki) check the following new rules should be fixed or ignored
|
||||
# E731 do not assign a lambda expression, use a def
|
||||
ignore = E125,E126,E128,E129,E265,E731,H404,H405,N530,N534
|
||||
ignore = E125,E126,E128,E129,E731,H404,H405,N530,N534
|
||||
# H106: Don't put vim configuration in source files
|
||||
# H203: Use assertIs(Not)None to check for None
|
||||
# H204: Use assert(Not)Equal to check for equality
|
||||
|
|
Loading…
Reference in New Issue