Fix issues detected by pycodestyle

When doing a test using pycodestyle instead of pep8, a few errors were
reported.

Fix those errors so it passed the tests.

Change-Id: I8e280aeab0575bd5a0919cbe4b9292df51c987ed
This commit is contained in:
John L. Villalovos
2016-08-23 16:57:39 -07:00
parent 7c360d21c7
commit cd3a213adb
2 changed files with 7 additions and 6 deletions

View File

@@ -37,12 +37,12 @@ def hacking_python3x_except_compatible(logical_line, noqa):
return
def is_old_style_except(logical_line):
return (',' in logical_line
and ')' not in logical_line.rpartition(',')[2])
return (',' in logical_line and
')' not in logical_line.rpartition(',')[2])
if (logical_line.startswith("except ")
and logical_line.endswith(':')
and is_old_style_except(logical_line)):
if (logical_line.startswith("except ") and
logical_line.endswith(':') and
is_old_style_except(logical_line)):
yield 0, "H231: Python 3.x incompatible 'except x,y:' construct"

View File

@@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import pbr.version
# Hacking Release Notes documentation build configuration file, created by
# sphinx-quickstart on Tue Nov 3 17:40:50 2015.
#
@@ -62,7 +64,6 @@ copyright = u'2015, Hacking Developers'
# |version| and |release|, also used in various other places throughout the
# built documents.
import pbr.version
version_info = pbr.version.VersionInfo('hacking')
# The short X.Y version.
release = version_info.version_string_with_vcs()