From 17bde8fb213c0f95b397196cc19216225a9f276d Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Thu, 14 May 2020 19:25:00 +0100 Subject: [PATCH] Add pylint singleton-comparison check --- fract4d_compiler/tests/test_symbol.py | 4 ++-- pylintrc | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fract4d_compiler/tests/test_symbol.py b/fract4d_compiler/tests/test_symbol.py index fd8ef721b..a7318502f 100644 --- a/fract4d_compiler/tests/test_symbol.py +++ b/fract4d_compiler/tests/test_symbol.py @@ -32,7 +32,7 @@ def testCopy(self): self.assertEqual(c["foo"].value, 4) self.assertEqual(c["@fn1"][0].cname, "sin") - self.assertTrue(c[name].is_temp == True) + self.assertTrue(c[name].is_temp) def testParamSlots(self): t = fsymbol.T("boo") @@ -279,7 +279,7 @@ def testAllSymbolsWork(self): def testTemps(self): name = self.t.newTemp(Float) - self.assertTrue(self.t[name].is_temp == True) + self.assertTrue(self.t[name].is_temp) def assertIsValidVar(self, val): if isinstance(val, Var): diff --git a/pylintrc b/pylintrc index f81e62d63..a2c963a72 100644 --- a/pylintrc +++ b/pylintrc @@ -7,6 +7,7 @@ enable=E, unnecessary-semicolon, trailing-newlines, bare-except, + singleton-comparison, unused-import ignore=parsetab.py,lextab.py