Fix E265 block comment should start with '# '
All E265 errors are now fixed and remove it from ignore list. Change-Id: I09ada4cc0f33cae5da4cbc29a4e843e3ce14e111
This commit is contained in:
@@ -12,10 +12,6 @@
|
|||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
#
|
|
||||||
###
|
|
||||||
### Codes from neutron wsgi
|
|
||||||
###
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from xml.etree import ElementTree as etree
|
from xml.etree import ElementTree as etree
|
||||||
@@ -126,7 +122,7 @@ class XMLDictSerializer(DictSerializer):
|
|||||||
self._add_xmlns(node, used_prefixes, has_atom)
|
self._add_xmlns(node, used_prefixes, has_atom)
|
||||||
return etree.tostring(node, encoding='UTF-8')
|
return etree.tostring(node, encoding='UTF-8')
|
||||||
|
|
||||||
#NOTE (ameade): the has_atom should be removed after all of the
|
# NOTE(ameade): the has_atom should be removed after all of the
|
||||||
# XML serializers and view builders have been updated to the current
|
# XML serializers and view builders have been updated to the current
|
||||||
# spec that required all responses include the xmlns:atom, the has_atom
|
# spec that required all responses include the xmlns:atom, the has_atom
|
||||||
# flag is to prevent current tests from breaking
|
# flag is to prevent current tests from breaking
|
||||||
@@ -146,7 +142,7 @@ class XMLDictSerializer(DictSerializer):
|
|||||||
result = etree.SubElement(parent, nodename)
|
result = etree.SubElement(parent, nodename)
|
||||||
if ":" in nodename:
|
if ":" in nodename:
|
||||||
used_prefixes.append(nodename.split(":", 1)[0])
|
used_prefixes.append(nodename.split(":", 1)[0])
|
||||||
#TODO(bcwaldon): accomplish this without a type-check
|
# TODO(bcwaldon): accomplish this without a type-check
|
||||||
if isinstance(data, list):
|
if isinstance(data, list):
|
||||||
if not data:
|
if not data:
|
||||||
result.set(
|
result.set(
|
||||||
@@ -162,7 +158,7 @@ class XMLDictSerializer(DictSerializer):
|
|||||||
for item in data:
|
for item in data:
|
||||||
self._to_xml_node(result, metadata, singular, item,
|
self._to_xml_node(result, metadata, singular, item,
|
||||||
used_prefixes)
|
used_prefixes)
|
||||||
#TODO(bcwaldon): accomplish this without a type-check
|
# TODO(bcwaldon): accomplish this without a type-check
|
||||||
elif isinstance(data, dict):
|
elif isinstance(data, dict):
|
||||||
if not data:
|
if not data:
|
||||||
result.set(
|
result.set(
|
||||||
|
@@ -65,7 +65,7 @@ class FoxInSocketsUpdate(extension.ClientExtensionUpdate, FoxInSocket):
|
|||||||
list_columns = ['id', 'name']
|
list_columns = ['id', 'name']
|
||||||
|
|
||||||
def add_known_arguments(self, parser):
|
def add_known_arguments(self, parser):
|
||||||
#_add_updatable_args(parser)
|
# _add_updatable_args(parser)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--name',
|
'--name',
|
||||||
help=_('Name of this fox socket.'))
|
help=_('Name of this fox socket.'))
|
||||||
|
@@ -57,7 +57,7 @@ class CLITestV20FirewallPolicyJSON(test_cli20.CLITestV20Base):
|
|||||||
position_names = ['name', ]
|
position_names = ['name', ]
|
||||||
position_values = [name, ]
|
position_values = [name, ]
|
||||||
|
|
||||||
#check for both str and unicode format firewall_rules_arg
|
# check for both str and unicode format firewall_rules_arg
|
||||||
for firewall_rules_arg in ['rule_id1 rule_id2', u'rule_id1 rule_id2']:
|
for firewall_rules_arg in ['rule_id1 rule_id2', u'rule_id1 rule_id2']:
|
||||||
args = ['--description', description,
|
args = ['--description', description,
|
||||||
'--shared',
|
'--shared',
|
||||||
|
3
tox.ini
3
tox.ini
@@ -40,8 +40,7 @@ downloadcache = ~/cache/pip
|
|||||||
# E125 continuation line does not distinguish itself from next logical line
|
# E125 continuation line does not distinguish itself from next logical line
|
||||||
#
|
#
|
||||||
# TODO Fix the following rules from hacking 0.9.x
|
# TODO Fix the following rules from hacking 0.9.x
|
||||||
# E265 block comment should start with '# '
|
|
||||||
# H405 multi line docstring summary not separated with an empty line
|
# H405 multi line docstring summary not separated with an empty line
|
||||||
ignore = E125,E265,H405
|
ignore = E125,H405
|
||||||
show-source = true
|
show-source = true
|
||||||
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools
|
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools
|
||||||
|
Reference in New Issue
Block a user