Update hacking version

Use latest release 1.1.0 and compatible changes w.r.t pep8

Change-Id: I8c82e52e03b2489aca0b70de761da5ac328c7b9c
This commit is contained in:
ZhijunWei 2018-12-28 22:52:08 +08:00
parent 3c71e50f0a
commit 8171c03846
5 changed files with 11 additions and 11 deletions

View File

@ -1,4 +1,4 @@
oslo.reports Style Commandments oslo.reports Style Commandments
====================================================== ===============================
Read the OpenStack Style Commandments https://docs.openstack.org/hacking/latest/ Read the OpenStack Style Commandments https://docs.openstack.org/hacking/latest/

View File

@ -10,17 +10,17 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
__all__ = [
'list_opts',
'set_defaults',
]
import copy import copy
from oslo_config import cfg from oslo_config import cfg
from oslo_reports._i18n import _ from oslo_reports._i18n import _
__all__ = [
'list_opts',
'set_defaults',
]
_option_group = 'oslo_reports' _option_group = 'oslo_reports'

View File

@ -52,8 +52,8 @@ class FakeVersionObj(object):
def skip_body_lines(start_line, report_lines): def skip_body_lines(start_line, report_lines):
curr_line = start_line curr_line = start_line
while (len(report_lines[curr_line]) == 0 while (len(report_lines[curr_line]) == 0 or
or report_lines[curr_line][0] != '='): report_lines[curr_line][0] != '='):
curr_line += 1 curr_line += 1
return curr_line return curr_line

View File

@ -68,8 +68,8 @@ class KeyValueView(object):
if isinstance(rootmodel, col.Mapping): if isinstance(rootmodel, col.Mapping):
for key in sorted(rootmodel): for key in sorted(rootmodel):
res.append(serialize(rootmodel[key], key)) res.append(serialize(rootmodel[key], key))
elif (isinstance(rootmodel, col.Sequence) elif (isinstance(rootmodel, col.Sequence) and
and not isinstance(rootmodel, six.string_types)): not isinstance(rootmodel, six.string_types)):
for val in sorted(rootmodel, key=str): for val in sorted(rootmodel, key=str):
res.append(serialize(val, 'item')) res.append(serialize(val, 'item'))
elif ET.iselement(rootmodel): elif ET.iselement(rootmodel):

View File

@ -2,7 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration # of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later. # process, which may cause wedges in the gate later.
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 hacking>=1.1.0,<1.2.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0
stestr>=2.0.0 # Apache-2.0 stestr>=2.0.0 # Apache-2.0