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

[minion-cvs] Make pychecker far happier; update many copyright notic...



Update of /home/minion/cvsroot/src/minion
In directory moria.mit.edu:/tmp/cvs-serv4440

Modified Files:
	Makefile TODO pycheckrc 
Log Message:
Make pychecker far happier; update many copyright notices; fix a couple actual bugs

Index: Makefile
===================================================================
RCS file: /home/minion/cvsroot/src/minion/Makefile,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- Makefile	3 Jan 2004 05:45:25 -0000	1.62
+++ Makefile	3 Jan 2004 07:35:22 -0000	1.63
@@ -1,4 +1,4 @@
-# Copyright 2002-2003 Nick Mathewson.  See LICENSE for licensing information.
+# Copyright 2002-2004 Nick Mathewson.  See LICENSE for licensing information.
 # $Id$
 
 # Okay, we'll start with a little make magic.   The goal is to define the

Index: TODO
===================================================================
RCS file: /home/minion/cvsroot/src/minion/TODO,v
retrieving revision 1.178
retrieving revision 1.179
diff -u -d -r1.178 -r1.179
--- TODO	3 Jan 2004 05:45:25 -0000	1.178
+++ TODO	3 Jan 2004 07:35:22 -0000	1.179
@@ -25,8 +25,8 @@
                   decide whether to look for a tag in the RI field.
                 - Make processing thread and module thread general
                   cases of a thread pool abstraction.?
-        - Performance
-                - Do a setsockopt(IP_TOS, IPTOS_THROUGHPUT), unless on
+        o Performance
+                D Do a setsockopt(IP_TOS, IPTOS_THROUGHPUT), unless on
                   cygwin, dgux, sni-sysv.
         - UI improvements
                 - RFC822 interface and maildir-style exit module to help

Index: pycheckrc
===================================================================
RCS file: /home/minion/cvsroot/src/minion/pycheckrc,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- pycheckrc	5 Jan 2003 06:49:24 -0000	1.6
+++ pycheckrc	3 Jan 2004 07:35:22 -0000	1.7
@@ -1,9 +1,10 @@
-# Sample defaults file for PyChecker 0.8.11
+# Sample defaults file for PyChecker 0.8.13
 # This file should be called:  .pycheckrc
 # It should be placed in your home directory (value of $HOME).
 # If $HOME is not set, it will look in the current directory.
 
 import os
+print "pycheckrc!!!"
 _PARANOID = os.environ.get("PYCHECKER_HEAVY",None)
 if _PARANOID == 'max':
     _VERY_PARANOID = _PARANOID = 1
@@ -13,16 +14,16 @@
     _VERY_PARANOID = _PARANOID = 0
 
 # bool: warnings for Doc Strings
-noDocModule = _PARANOID
-noDocClass = _PARANOID
-noDocFunc = _PARANOID
+noDocModule = 0
+noDocClass = 0
+noDocFunc = 0
 
 # bool: when checking if class data members (attributes) are set
 #       check all members or __init__() only
 onlyCheckInitForMembers = 0
 
 # bool: warn when all module variables are not used (including private vars)
-allVariablesUsed = _PARANOID
+allVariablesUsed = 0
 
 # bool: produce warnings for each occurrence of a warning for global (xxx)
 reportAllGlobals = 0
@@ -34,7 +35,7 @@
 importUsed = 1
 
 # bool: warn when import and from ... import are used for same module
-mixImport = _PARANOID
+mixImport = 0
 
 # bool: warn when imports are not used in __init__.py
 packageImportUsed = 1
@@ -67,10 +68,10 @@
 returnNoneFromInit = 1
 
 # bool: warn when code is not reachable
-unreachableCode = 0
+unreachableCode = 0 #XXXX broken in 0.8.13
 
 # bool: warn when a constant is used in a conditional statement (if '':)
-constantConditions = 1
+constantConditions = 0 # XXXX This is broken in pychecker 0.8.13
 
 # bool: warn when 1 is used in a conditional statement, (if 1: while 1: etc)
 constant1 = 0
@@ -79,23 +80,34 @@
 stringIteration = 1
 
 # bool: warn when setting a variable to different types
-inconsistentTypes = 1
+inconsistentTypes = 0
 
 # bool: warn when setting a tuple of variables to a non-sequence (a, b = None)
 unpackNonSequence = 1
 
-# bool: warn when setting a tuple of variables to the wrong size (a, b = 1,)
-unpackSize = 1
+# bool: warn when setting a tuple of variables to the wrong length (a, b = 1,)
+unpackLength = 1
 
-# bool: warn when using strings exceptions or
+# bool: warn when using strings exceptions or 
 #       other classes not derived from Exception to raise/catch exceptions
 badExceptions = 1
 
+# bool: warn when statements appear to have no effect
+noEffect = 1
+
+# bool: warn when using (expr % 1), it has no effect on integers and strings
+modulo1 = 1
+
+# bool: warn if using (expr is const-literal), 
+# doesn't always work on integers and strings
+isLiteral = 1
+
 # bool: warn when using a deprecated module or function
 deprecated = 1
 
 # bool: warn when the class attribute does not exist
-classAttrExists = 1
+classAttrExists = 0 # XXXX seems broken, or at least full of false positives
+                    # XXXX with mixin classes and "import foo as bar."
 
 # bool: warn when calling an attribute not a method
 callingAttribute = 0
@@ -107,8 +119,11 @@
 # str: name of 'self' parameter
 methodArgName = 'self'
 
+# list of str: names of first parameter to classmethods
+classmethodArgNames = ['cls', 'klass']
+
 # bool: warn when method/function arguments are unused
-argumentsUsed = _VERY_PARANOID
+argumentsUsed = 0 # This behaves foolishly with polymorphism.
 
 # bool: ignore if self is unused in methods
 ignoreSelfUnused = 0
@@ -117,28 +132,25 @@
 redefiningFunction = 1
 
 # bool:  check if an overriden method has the same signature
-#        as base class method (__init__() methods are not checked)
+#	 as base class method (__init__() methods are not checked)
 checkOverridenMethods = 1
 
+# bool:  check if a special (reserved) method has the correct signature
+#	 and is known (these are methods that begin and end with __
+checkSpecialMethods = 1
+
 # int: warnings for code complexity, max value before generating a warning
-if _PARANOID:
-    maxLines = 100
-    maxBranches = 20
-    maxReturns = 10
-    maxArgs = 7
-    maxLocals = 15
-    maxReferences = 10
-else:
-    maxLines = 300
-    maxBranches = 50
-    maxReturns = 20
-    maxArgs = 15
-    maxLocals = 30
-    maxReferences = 20
+maxLines = 200
+maxBranches = 50
+maxReturns = 10
+maxArgs = 10
+maxLocals = 25
+maxReferences = 5
+
 
 # bool:  ignore all warnings from standard library components
-#        (this includes anything under the standard library, eg, site-packages)
-ignoreStandardLibrary = 1
+#	 (this includes anything under the standard library, eg, site-packages)
+ignoreStandardLibrary = 0
 
 
 # list of strings: ignore unused locals/arguments if name is one of
@@ -180,6 +192,9 @@
 # bool: check if input() is used, which is a security problem, use raw_input()
 usesInput = 1
 
+# bool: check if using a constant string to getattr()/setattr()
+constAttr = 1
+
 # bool: check for using +variable, since it is almost always has no effect
 unaryPositive = 1
 
@@ -189,7 +204,7 @@
 modifyDefaultValue = 1
 
 # bool: check if the exec statement is used (possible security problem)
-usesExec = 1
+usesExec = 0
 
 # bool: check consistent return values
 checkReturnValues = 1
@@ -198,13 +213,12 @@
 checkImplicitReturns = 1
 
 # dict: suppress warnings, key is module.class.method or module.function
-#       value is a string of command line arguments (can omit -- for long args)
+#	value is a string of command line arguments (can omit -- for long args)
 #       { 'module1': 'no-namedargs maxlines=0',
-#         'module2.my_func': 'argsused',
-#         'module3.my_class': 'no-initreturn', }
+#	  'module2.my_func': 'argsused',
+#	  'module3.my_class': 'no-initreturn', }
 suppressions = {}
 
 # dict: suppress warnings where keys can be regular expressions
 suppressionRegexs = {}
 
-del os, _PARANOID, _VERY_PARANOID