Fix style error E265

E265: Block comment should start with '# '

Change-Id: I7aac8e22ecd88d99e58bf53c3e7f4157a8acbe68
Implements: blueprint new-hacking-style-rules
This commit is contained in:
Jordan Cazamias 2014-06-18 13:04:17 -05:00
parent d9825a64aa
commit 0a2406739a
14 changed files with 32 additions and 33 deletions

View File

@ -236,7 +236,7 @@ class FaultWrapperMiddleware(wsgi.Middleware):
notifications.send_api_fault(request.environ['context'], url,
response['code'], e)
else:
#TODO(ekarlso): Remove after verifying that there's actually a
# TODO(ekarlso): Remove after verifying that there's actually a
# context always set
LOG.error(_LE('Missing context in request, please check.'))

View File

@ -250,7 +250,7 @@ class ZonesController(rest.RestController):
# NOTE: This is a hack and a half.. But Pecan needs it.
return ''
#TODO(artom) Methods below may be useful elsewhere, consider putting them
# TODO(artom) Methods below may be useful elsewhere, consider putting them
# somewhere reusable.
def _create_zone(self, context, dnspython_zone):

View File

@ -125,7 +125,7 @@ class BaseView(object):
}
# See above
#if 'marker' in params:
# if 'marker' in params:
# result['previous'] = self._get_previous_href(request, items,
# parents)

View File

@ -142,10 +142,10 @@ class Bind9Backend(base.Backend):
utils.execute(*rndc_call)
#This goes and gets the name of the .nzf file that is a mirror of the
#zones.config file we wish to maintain. The file name can change as it
#is a hash of rndc view name, we're only interested in the first file
#name this returns because there is only one .nzf file
# This goes and gets the name of the .nzf file that is a mirror of the
# zones.config file we wish to maintain. The file name can change as it
# is a hash of rndc view name, we're only interested in the first file
# name this returns because there is only one .nzf file
nzf_name = glob.glob('%s/*.nzf' % cfg.CONF[self.name].nzf_path)
output_file = os.path.join(output_folder, 'zones.config')

View File

@ -43,8 +43,8 @@ def get_available_commands():
def add_command_parser(subparsers):
#for name, category in get_available_commands()
#parser = subparsers.add_parser('db')
# for name, category in get_available_commands()
# parser = subparsers.add_parser('db')
for name, cls in get_available_commands().items():
obj = cls()

View File

@ -100,9 +100,9 @@ def wrap_exception(f):
return f(*args, **kw)
except Exception, e:
if not isinstance(e, Error):
#exc_type, exc_value, exc_traceback = sys.exc_info()
# exc_type, exc_value, exc_traceback = sys.exc_info()
logging.exception(_('Uncaught exception'))
#logging.error(traceback.extract_stack(exc_traceback))
# logging.error(traceback.extract_stack(exc_traceback))
raise Error(str(e))
raise
_wrap.func_name = f.func_name

View File

@ -479,7 +479,7 @@ class XMLDictSerializer(DictSerializer):
self._add_xmlns(node, has_atom)
return node.toprettyxml(indent=' ', 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
# spec that required all responses include the xmlns:atom, the has_atom
# flag is to prevent current tests from breaking
@ -499,7 +499,7 @@ class XMLDictSerializer(DictSerializer):
if xmlns:
result.setAttribute('xmlns', xmlns)
#TODO(bcwaldon): accomplish this without a type-check
# TODO(bcwaldon): accomplish this without a type-check
if type(data) is list:
collections = metadata.get('list_collections', {})
if nodename in collections:
@ -518,7 +518,7 @@ class XMLDictSerializer(DictSerializer):
for item in data:
node = self._to_xml_node(doc, metadata, singular, item)
result.appendChild(node)
#TODO(bcwaldon): accomplish this without a type-check
# TODO(bcwaldon): accomplish this without a type-check
elif type(data) is dict:
collections = metadata.get('dict_collections', {})
if nodename in collections:

View File

@ -149,15 +149,15 @@ class SQLAlchemyStorage(base.Storage):
except ValueError as value_error:
raise exceptions.ValueError(value_error.message)
## CRUD for our resources (quota, server, tsigkey, tenant, domain & record)
## R - get_*, find_*s
##
## Standard Arguments
## self - python object for the class
## context - a dictionary of details about the request (http etc),
## provided by flask.
## criterion - dictionary of filters to be applied
##
# CRUD for our resources (quota, server, tsigkey, tenant, domain & record)
# R - get_*, find_*s
#
# Standard Arguments
# self - python object for the class
# context - a dictionary of details about the request (http etc),
# provided by flask.
# criterion - dictionary of filters to be applied
#
# Quota Methods
def _find_quotas(self, context, criterion, one=False,
@ -377,7 +377,7 @@ class SQLAlchemyStorage(base.Storage):
return objects.TsigKey.from_sqla(tsigkey)
##
## Tenant Methods
# Tenant Methods
##
def find_tenants(self, context):
# returns an array of tenant_id & count of their domains
@ -414,7 +414,7 @@ class SQLAlchemyStorage(base.Storage):
return query.count()
##
## Domain Methods
# Domain Methods
##
def _find_domains(self, context, criterion, one=False,
marker=None, limit=None, sort_key=None, sort_dir=None):

View File

@ -26,7 +26,7 @@ def upgrade(migrate_engine):
domains_table = Table('domains', meta, autoload=True)
records_table = Table('records', meta, autoload=True)
#Add in description columns in domain/record databases
# Add in description columns in domain/record databases
domain_description = Column('description', Unicode(160),
nullable=True)
domain_description.create(domains_table, populate_default=True)

View File

@ -115,7 +115,7 @@ class ApiV1DomainsTest(ApiV1Test):
fixture = self.get_domain_fixture(0)
fixture['description'] = "x" * 161
#Create the domain, ensuring it fails with a 400
# Create the domain, ensuring it fails with a 400
self.post('domains', data=fixture, status_code=400)
def test_create_invalid_name(self):

View File

@ -100,7 +100,7 @@ class ApiV1RecordsTest(ApiV1Test):
'type': self.recordset['type'],
})
#Add a UTF-8 riddled description
# Add a UTF-8 riddled description
fixture['description'] = "utf-8:2H₂+O₂⇌2H₂O,R=4.7kΩ,⌀200mm∮E⋅da=Q,n" \
",∑f(i)=∏g(i),∀x∈:⌈x⌉"

View File

@ -35,7 +35,7 @@ class ApiV2ReverseFloatingIPTest(ApiV2TestCase):
self.assertEqual('application/json', response.content_type)
self.assertIn('floatingip', response.json)
#TODO(ekarlso): Remove the floatingip key - bug in v2 api
# TODO(ekarlso): Remove the floatingip key - bug in v2 api
fip_record = response.json['floatingip']
self.assertEqual(":".join([fip['region'],
fip['id']]), fip_record['id'])

View File

@ -636,7 +636,7 @@ class CentralServiceTest(CentralTestCase):
# Create a server
self.create_server()
#Create domain with random TTL
# Create domain with random TTL
domain = self.central_service.create_domain(
self.admin_context, domain=objects.Domain(**values))
@ -1874,7 +1874,7 @@ class CentralServiceTest(CentralTestCase):
self.assertEqual(blacklists[1]['pattern'], values2['pattern'])
def test_find_blacklist(self):
#Create a blacklisted zone
# Create a blacklisted zone
expected = self.create_blacklist(fixture=0)
# Retrieve the newly created blacklist

View File

@ -44,8 +44,7 @@ commands = {posargs}
# H904 Wrap long lines in parentheses instead of a backslash
# E126 continuation line over-indented for hanging indent
# E128 continuation line under-indented for visual indent
# E265 Block comment should start with '# '
ignore = H104,H302,H305,H306,H307,H401,H402,H404,H405,H904,E126,E128,E265
ignore = H104,H302,H305,H306,H307,H401,H402,H404,H405,H904,E126,E128
builtins = _
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*openstack/deprecated*,*lib/python*,*egg,build,tools