Enable H402 style check

Full stop at the end of single-line docstring.

Change-Id: I9f24dbe0666069800979758d3628ed4f7fc4979b
This commit is contained in:
Pavlo Shchelokovskyy 2015-01-02 16:45:24 +02:00
parent 26117bd9ea
commit f1b5a782b7
4 changed files with 7 additions and 8 deletions

View File

@ -261,9 +261,9 @@ class Dependencies(object):
return self._graph.copy()
def __iter__(self):
'''Return a topologically sorted iterator'''
'''Return a topologically sorted iterator.'''
return Graph.toposort(self.graph())
def __reversed__(self):
'''Return a reverse topologically sorted iterator'''
'''Return a reverse topologically sorted iterator.'''
return Graph.toposort(self.graph(reverse=True))

View File

@ -276,7 +276,7 @@ class Parameter(object):
self.user_default = value
def __str__(self):
'''Return a string representation of the parameter'''
'''Return a string representation of the parameter.'''
value = self.value()
if self.hidden():
return '******'
@ -288,11 +288,11 @@ class NumberParam(Parameter):
'''A template parameter of type "Number".'''
def __int__(self):
'''Return an integer representation of the parameter'''
'''Return an integer representation of the parameter.'''
return int(super(NumberParam, self).value())
def __float__(self):
'''Return a float representation of the parameter'''
'''Return a float representation of the parameter.'''
return float(super(NumberParam, self).value())
def _validate(self, val, context):

View File

@ -1173,7 +1173,7 @@ class StackParametersTest(common.HeatTestCase):
class HOTParamValidatorTest(common.HeatTestCase):
"""Test HOTParamValidator"""
"""Test HOTParamValidator."""
def test_multiple_constraint_descriptions(self):
len_desc = 'string length should be between 8 and 16'

View File

@ -54,12 +54,11 @@ commands = oslo-config-generator --config-file=config-generator.conf
[flake8]
# H305 imports not grouped correctly
# H307 like imports should be grouped togethe
# H402 one line docstring needs punctuation
# H404 multi line docstring should start with a summary
# H405 multi line docstring summary not separated with an empty line
# H803 no full stop at the end of the commit message
# H904 Wrap long lines in parentheses instead of a backslash
ignore = H305,H307,H402,H404,H405,H803,H904
ignore = H305,H307,H404,H405,H803,H904
show-source = true
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,tools,build
max-complexity=20