Merge pull request #1111 from cclauss/master

Mark instances of 'long' with # noqa
This commit is contained in:
Matthew Johnson 2019-08-05 10:29:06 -07:00 committed by GitHub
commit 498ff8e54f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -179,7 +179,7 @@ array_types = {onp.ndarray, onp.float64, onp.float32, onp.float16,
onp.longlong, complex, float, int, bool}
if six.PY2:
array_types.add(long)
array_types.add(long) # noqa: F821
for t in array_types:
core.pytype_aval_mappings[t] = ConcreteArray

View File

@ -311,4 +311,4 @@ for scalar_type in [onp.int8, onp.int16, onp.int32, onp.int64,
register_constant_handler(scalar_type, _scalar_constant_handler)
if six.PY2:
register_constant_handler(long, _scalar_constant_handler)
register_constant_handler(long, _scalar_constant_handler) # noqa: F821

View File

@ -1388,7 +1388,7 @@ class LaxTest(jtu.JaxTestCase):
def testLongConstantHandling(self):
if six.PY3:
self.skipTest("Test is Python 2 specific")
self.assertTrue(api.jit(lambda x: lax.lt(x, long(10)))(long(3)))
self.assertTrue(api.jit(lambda x: lax.lt(x, long(10)))(long(3))) # noqa: F821
def testIssue831(self):
# Tests the DeviceTuple constant handler