Commits

Ali Gholami Rudi  committed 0524b52

finderrors: ignoring None

  • Participants
  • Parent commits 5b4a9ee

Comments (0)

Files changed (2)

File rope/contrib/finderrors.py

             name = node.attr
         else:
             name = node.id
+        if name in ['None']:
+            return
         error = Error(node.lineno, msg + ' ' + name)
         self.errors.append(error)
 

File ropetest/contrib/finderrorstest.py

         result = finderrors.find_errors(self.project, self.mod)
         self.assertEquals(0, len(result))
 
+    def test_ignoring_none(self):
+        self.mod.write('var = None\n')
+        result = finderrors.find_errors(self.project, self.mod)
+        self.assertEquals(0, len(result))
+
     def test_bad_attributes(self):
         code = 'class C(object):\n' \
                '    pass\n' \