Merge "clean up lints for automated_steps doc plugin"
This commit is contained in:
commit
afd59e3da9
@ -12,11 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from collections import defaultdict
|
||||
import inspect
|
||||
import itertools
|
||||
import operator
|
||||
import os.path
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.parsers import rst
|
||||
@ -58,8 +54,8 @@ def _list_table(add, headers, data, title='', columns=None):
|
||||
else:
|
||||
# potentially multi-line string
|
||||
add(' * %s' % lines[0])
|
||||
for l in lines[1:]:
|
||||
add(' %s' % l)
|
||||
for line in lines[1:]:
|
||||
add(' %s' % line)
|
||||
add('')
|
||||
|
||||
|
||||
@ -88,8 +84,8 @@ def _init_steps_by_driver():
|
||||
|
||||
for interface_name in sorted(driver_factory.driver_base.ALL_INTERFACES):
|
||||
if DEBUG:
|
||||
LOG.info('[{}] probing available plugins for interface {}'.format(
|
||||
__name__, interface_name))
|
||||
LOG.info('[%s] probing available plugins for interface %s',
|
||||
__name__, interface_name)
|
||||
|
||||
loader = stevedore.ExtensionManager(
|
||||
'ironic.hardware.interfaces.{}'.format(interface_name),
|
||||
@ -114,8 +110,8 @@ def _init_steps_by_driver():
|
||||
'doc': _format_doc(inspect.getdoc(method)),
|
||||
}
|
||||
if DEBUG:
|
||||
LOG.info('[{}] interface {!r} driver {!r} STEP {}'.format(
|
||||
__name__, interface_name, plugin.name, step))
|
||||
LOG.info('[%s] interface %r driver %r STEP %r',
|
||||
__name__, interface_name, plugin.name, step)
|
||||
steps.append(step)
|
||||
|
||||
if steps:
|
||||
@ -168,7 +164,8 @@ class AutomatedStepsDirective(rst.Directive):
|
||||
_list_table(
|
||||
title='{} cleaning steps'.format(driver_name),
|
||||
add=lambda x: result.append(x, source_name),
|
||||
headers=['Name', 'Details', 'Priority', 'Stoppable', 'Arguments'],
|
||||
headers=['Name', 'Details', 'Priority',
|
||||
'Stoppable', 'Arguments'],
|
||||
columns=[20, 30, 10, 10, 30],
|
||||
data=(
|
||||
('``{}``'.format(s['step']),
|
||||
|
Loading…
Reference in New Issue
Block a user