Skip to content

Commit

Permalink
[4639] Apply string formatting standard
Browse files Browse the repository at this point in the history
  • Loading branch information
pdelboca committed Jun 27, 2019
1 parent c17dc22 commit 1b3cf60
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ckan/cli/plugin_info.py
Expand Up @@ -36,7 +36,7 @@ def plugin_info():
extra = _template_helpers(p['class'])
if i == 'IActions':
extra = _actions(p['class'])
click.echo(' %s' % i)
click.echo(' {i}'.format(i=i))
if extra:
click.echo(extra)
click.echo()
Expand Down Expand Up @@ -72,10 +72,11 @@ def _function_info(functions):
if inspect.ismethod(fn) and inspect.isclass(fn.__self__):
params = params[1:]
params = ', '.join(params)
output.append(' %s(%s)' % (function_name, params))
output.append(' {function_name}({params})'.format(
function_name=function_name, params=params))
# doc string
if fn.__doc__:
bits = fn.__doc__.split('\n')
for bit in bits:
output.append(' %s' % bit)
output.append(' {bit}'.format(bit=bit))
return ('\n').join(output)

0 comments on commit 1b3cf60

Please sign in to comment.