ignore python2-specific code under python3 for pep8

The type 'long' no longer exists under python 3. The runtime execution
of the code using it in the metrics module already detects the python
version, but when the linter is run under python 3 it does not apply
the same check. Add a noqa pragma to tell the linter to ignore the
line where 'long' is referenced to avoid an error.

Change-Id: If806e6461358ea523708eceed6fdcc3dfb8d75a9
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-06-06 17:02:08 -04:00
parent c5436ecddb
commit 2a362bea97
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ NUMERIC_VALUES = [int, float]
if six.PY2:
# according to PEP537 long was renamed to int in PY3
# need to add long, as possible value, for PY2
NUMERIC_VALUES += [long]
NUMERIC_VALUES += [long] # noqa
NUMERIC_VALUES = tuple(NUMERIC_VALUES) # convert to tuple for instance call