diff --git a/neutronclient/osc/v2/fwaas/firewallgroup.py b/neutronclient/osc/v2/fwaas/firewallgroup.py index 68f0fa49c..b84442f13 100644 --- a/neutronclient/osc/v2/fwaas/firewallgroup.py +++ b/neutronclient/osc/v2/fwaas/firewallgroup.py @@ -215,8 +215,8 @@ class DeleteFirewallGroup(command.Command): except Exception as e: result += 1 LOG.error(_("Failed to delete firewall group with " - "name or ID '%(firewall_group)s': %(e)s") % { - const.FWG: fwg, 'e': e}) + "name or ID '%(firewall_group)s': %(e)s"), + {const.FWG: fwg, 'e': e}) if result > 0: total = len(parsed_args.firewall_group) diff --git a/neutronclient/osc/v2/fwaas/firewallpolicy.py b/neutronclient/osc/v2/fwaas/firewallpolicy.py index b0f0a4243..84f890653 100644 --- a/neutronclient/osc/v2/fwaas/firewallpolicy.py +++ b/neutronclient/osc/v2/fwaas/firewallpolicy.py @@ -170,8 +170,8 @@ class DeleteFirewallPolicy(command.Command): except Exception as e: result += 1 LOG.error(_("Failed to delete Firewall policy with " - "name or ID '%(firewall_policy)s': %(e)s") % { - const.FWP: fwp, 'e': e}) + "name or ID '%(firewall_policy)s': %(e)s"), + {const.FWP: fwp, 'e': e}) if result > 0: total = len(parsed_args.firewall_policy) diff --git a/neutronclient/osc/v2/fwaas/firewallrule.py b/neutronclient/osc/v2/fwaas/firewallrule.py index 377ede740..00b3b216e 100644 --- a/neutronclient/osc/v2/fwaas/firewallrule.py +++ b/neutronclient/osc/v2/fwaas/firewallrule.py @@ -229,8 +229,8 @@ class DeleteFirewallRule(command.Command): except Exception as e: result += 1 LOG.error(_("Failed to delete Firewall rule with " - "name or ID '%(firewall_rule)s': %(e)s") % { - const.FWR: fwr, 'e': e}) + "name or ID '%(firewall_rule)s': %(e)s"), + {const.FWR: fwr, 'e': e}) if result > 0: total = len(parsed_args.firewall_rule) diff --git a/neutronclient/osc/v2/trunk/network_trunk.py b/neutronclient/osc/v2/trunk/network_trunk.py index acd6208db..0cee32e5d 100644 --- a/neutronclient/osc/v2/trunk/network_trunk.py +++ b/neutronclient/osc/v2/trunk/network_trunk.py @@ -112,8 +112,8 @@ class DeleteNetworkTrunk(command.Command): except Exception as e: result += 1 LOG.error(_("Failed to delete trunk with name " - "or ID '%(trunk)s': %(e)s") - % {'trunk': trunk, 'e': e}) + "or ID '%(trunk)s': %(e)s"), + {'trunk': trunk, 'e': e}) if result > 0: total = len(parsed_args.trunk) msg = (_("%(result)s of %(total)s trunks failed " diff --git a/tox.ini b/tox.ini index d0fc45ec8..587612486 100644 --- a/tox.ini +++ b/tox.ini @@ -55,3 +55,5 @@ commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenote [flake8] show-source = true exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools +# H904: Delay string interpolations at logging calls +enable-extensions=H904