[mousetrap/gnome3-wip: 55/240] Avoiding disabling PyLint for now



commit 54318aa8599c81cfef50f18ecb9fa5e61a0656ff
Author: Kevin Brown <kbrown rediker com>
Date:   Mon Jun 2 21:37:55 2014 -0400

    Avoiding disabling PyLint for now
    
    While the test files did cause PyLint to stop mid-way, this was
    because of the `too-many-public-methods` error.  This error was
    being raised because the test classes extend off of `TestCase`,
    which has quite a few public methods, and PyLint associates these
    public methods with the subclass.
    
    `reports=no` has also been defaulted in the `pylintrc` file, as
    this flag was always being included in the main running.  It is
    possible for other users to enable detailed reporting, but for
    most cases this will not be needed.
    
    The `unused-variable` skip has also been dropped.  The comment was
    added as the variable is only used for testing purposes.  There
    should be a better way to test that the output of the function can
    be used is not a number, especially because the test will pass in
    cases where the output would not be a number.

 bin/mt-pylint                |    4 +---
 pylintrc                     |    4 ++--
 src/mousetrap/test_camera.py |    2 --
 src/mousetrap/test_mouse.py  |    4 +---
 4 files changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/bin/mt-pylint b/bin/mt-pylint
index 1678bd6..785d615 100755
--- a/bin/mt-pylint
+++ b/bin/mt-pylint
@@ -2,6 +2,4 @@
 
 source "$(dirname "$0")/mt-define-mousetrap-home"
 
-pylint \
-    --reports=n \
-    "$MOUSETRAP_HOME/src/mousetrap"
+pylint "$MOUSETRAP_HOME/src/mousetrap"
diff --git a/pylintrc b/pylintrc
index e58fa08..5d7884d 100644
--- a/pylintrc
+++ b/pylintrc
@@ -38,7 +38,7 @@ load-plugins=
 # --enable=similarities". If you want to run only the classes checker, but have
 # no Warning level messages displayed, use"--disable=all --enable=classes
 # --disable=W"
-disable=missing-docstring
+disable=missing-docstring,too-many-public-methods
 
 
 [REPORTS]
@@ -54,7 +54,7 @@ output-format=colorized
 files-output=no
 
 # Tells whether to display a full report or only the messages
-reports=yes
+reports=no
 
 # Python expression which should return a note less than 10 (10 is the highest
 # note). You have access to the variables errors warning, statement which
diff --git a/src/mousetrap/test_camera.py b/src/mousetrap/test_camera.py
index 7077935..e576ae2 100644
--- a/src/mousetrap/test_camera.py
+++ b/src/mousetrap/test_camera.py
@@ -1,5 +1,3 @@
-# pylint: skip-file
-
 import unittest
 from mousetrap.camera import Camera, CameraError
 
diff --git a/src/mousetrap/test_mouse.py b/src/mousetrap/test_mouse.py
index 0c990ad..2bb215d 100644
--- a/src/mousetrap/test_mouse.py
+++ b/src/mousetrap/test_mouse.py
@@ -1,5 +1,3 @@
-# pylint: skip-file
-
 import unittest
 from mousetrap.mouse import Mouse
 
@@ -10,8 +8,8 @@ class test_mouse(unittest.TestCase):
         self.mouse = Mouse()
 
     def test_get_position(self):
-        # pylint: disable=unused-variable
         x, y = self.mouse.get_position()
+
         try:
             x += 1
             y += 1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]