Hacking package upgraded, code cleaned to enforce new style rules

Registered by Jordan Cazamias

The hacking package has been upgraded from 'hacking>=0.8.0,<0.9' to 'hacking>=0.9.2,<0.10' to fix bug #1330540 (https://bugs.launchpad.net/designate/+bug/1330540). As such, new style rules have been added to the flake8 tests and must be addressed. Some of these rules will be added to Designate's enforcement, and some will be ignored.

The following rules have been added and are now enforced:
- H236 Python 3.x incompatible __metaclass__, use six.add_metaclass()
- H305 imports not grouped correctly
- H307 like imports should be grouped together
- E111 Indentation is not a multiple of four
- E251 unexpected spaces around keyword / parameter equals
- E265 Block comment should start with '# '

The following rules will be added to the tox.ini ignore list:
- H104 file contains nothing more than comments
- H405 multi line docstring summary not separated with an empty line
- 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

Blueprint information

Status:
Complete
Approver:
Kiall Mac Innes
Priority:
Low
Drafter:
Jordan Cazamias
Direction:
Approved
Assignee:
Jordan Cazamias
Definition:
Approved
Series goal:
Accepted for juno
Implementation:
Implemented
Milestone target:
milestone icon 2014.2
Started by
Kiall Mac Innes
Completed by
Kiall Mac Innes

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/new-hacking-style-rules,n,z

Addressed by: https://review.openstack.org/100981
    Fix style error H236

Addressed by: https://review.openstack.org/100982
    Fix style error E111

Addressed by: https://review.openstack.org/100983
    Fix style error E251

Addressed by: https://review.openstack.org/100984
    Fix style error E265

Addressed by: https://review.openstack.org/100985
    Fix style errors H305 and H307

Addressed by: https://review.openstack.org/100986
    Finalize tox.ini codes

Addressed by: https://review.openstack.org/101211
    Indent lines for readability

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.