#@+leo-ver=4
#@+node:@file .pycheckrc
# NOTE: This file is created (and distributed) in the leo/dist directory.
# NOTE: You must copy this file to your $HOME directory for pychecker to use it!

#@@color
#@@tabwidth -4
#@@comment #

#@+others
#@+node:blacklist
# list of strings: ignore warnings generated from these modules
blacklist = [
	'Tkinter', 'wxPython', 'gtk', 'GTK', 'GDK',
    'mod_http',
]
#@-node:blacklist
#@+node:defaults
# bool: warnings for Doc Strings
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 = 0

# bool: produce warnings for each occurrence of a warning for global (xxx)
reportAllGlobals = 0

# bool: warn when private module variables are not used (_var)
privateVariableUsed = 1

# bool: warn when imports are not used
importUsed = 1

# bool: warn when imports are not used in __init__.py
packageImportUsed = 1

# bool:  assume a, b, and c are used in this case:  a, b, c = func()
unusedLocalTuple = 0

# bool:  warn when class attributes (data members) are unused
membersUsed = 0

# bool: warn when Subclass.__init__ is not called in a subclass
baseClassInitted = 1

# bool: warn when Subclass needs to override methods that only throw exceptions
abstractClasses = 1

# bool: warn when __init__ is defined in a subclass
initDefinedInSubclass = 0

# bool: warn when __init__ returns None
returnNoneFromInit = 1

# bool: warn when code is not reachable
unreachableCode = 0

# bool: warn when iterating over a string in a for loop
stringIteration = 1

# bool: warn when setting a variable to different types
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 length (a, b = 1,)
unpackLength = 1

# 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 when using a deprecated module or function
deprecated = 1

# bool: warn when calling an attribute not a method
callingAttribute = 0

# str: name of 'self' parameter
methodArgName = 'self'

# list of str: names of first parameter to classmethods
## classmethodArgNames = ['cls', 'klass']

# bool: ignore if self is unused in methods
ignoreSelfUnused = 0

# bool: warn if functions/classes/methods names are redefined in same scope
redefiningFunction = 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

# bool: print the PyChecker parse of modules, classes, etc.
printParse = 0

# bool: turn debugging of PyChecker on
debug = 0

# bool: various warnings about incorrect usage of __slots__
slots = 1

# bool: check if __slots__ is empty
emptySlots = 1

# bool: check for using properties in classic classes
classicProperties = 1

# bool: check for integer division (may be problem between Python versions)
intDivide = 1

# 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()
# Doesn't exist.
## constAttr = 1

# bool: check for using +variable, since it is almost always has no effect
unaryPositive = 1

# bool: check for modifying a parameter with a default value
#       (value must be: list, dict, instance)
#       modifying the value may have undesirable/unexpected side-effects
modifyDefaultValue = 1

# bool: check if the exec statement is used (possible security problem)
usesExec = 0
#@nonl
#@-node:defaults
#@+node:max...
# Max value before generating a complexity warning.

maxlines = 2000
maxbranches = 500
maxreturns = 100
maxargs = 100
maxlocals = 250
maxreferences = 500
#@nonl
#@-node:max...
#@+node:suppressions
# dict: suppress warnings, key is module.class.method or module.function
#	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', }

suppressions = {
    # Base classes have lots of unused params.
        'leoFrame' : '--no-argsused',
        'leoMenu'  : '--no-argsused',
        'leoGui'   : '--no-argsused',

    # A bad warning about lastVnode.  BOTH MUST BE SPECIFIED
        #'leoImport.baseLeoImportCommands.convertMoreStringsToOutlineAfter' : '--no-objattrs', 
        #'leoImport.leoImportCommands.convertMoreStringsToOutlineAfter'     : '--no-objattrs',
}

# dict: suppress warnings where keys can be regular expressions.
suppressionRegexs = {}
#@nonl
#@-node:suppressions
#@+node:unusedNames
# Ignore unused locals/arguments if name is one of the following:

unusedNames = [
	'_', 'empty', 'junk','unused', 'dummy', 'event', 'commander',
	'c', 'i', 'j', 'k', 's', 'z',
	'tag', 'args', 'keys', 'keywords',
]
#@-node:unusedNames
#@+node:variablesToIgnore
# list of strings: ignore global variables not used if name is one of

variablesToIgnore = [
    '__all__', '__version__', '__copyright__',
    '__revision__', # Suppress an warning about a library module.
]
#@nonl
#@-node:variablesToIgnore
#@-others

# Sample defaults file for PyChecker 0.8.14
# 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.

# Enabled tests...
checkObjectAttrs = 1        # True: check that attributes of objects exist
checkReturnValues = 1       # True: check consistent return values
checkImplicitReturns = 1    # True: check if using implict and explicit return values
classAttrExists = 1         # True: warn when the class attribute does not exist
mixImport = 1               # True: warn when import and from ... import are used for same module
moduleImportErrors = 1      # True: warn when a module reimports another module (import & from/import)
reimportSelf = 1            # True: warn when modules import themselves
shadows = 1                 # bool: check if local variables shadow a global variable with same name
localVariablesUsed = 1      # True: warn when local variables are not used

# Disabled by EKR...
argumentsUsed = 0       # True: warn when method/function arguments are unused
isLiteral = 0           # True: warn if using (expr is const-literal), doesn't always work on ints and strings
shadowBuiltins = 1      # EKR: Not in ref file.

# bool:  ignore all warnings from standard library components
#	 (this includes anything under the standard library, eg, site-packages)
ignoreStandardLibrary = 1 # EKR

# bool:  check if an overriden method has the same signature
#	 as base class method (__init__() methods are not checked)
checkOverridenMethods = 0 # EKR

# Won't enable...
constantConditions = 0  # bool: warn when a constant is used in a conditional statement (if '':)
constant1 = 0           # bool: warn when 1 is used in a conditional statement, (if 1: while 1: etc)

# bool: warn when using named arguments: func(a=1, b=2), where def func(a, b):
#       def func2(a, b, **kw): doesn't generate a warning
namedArgs = 0 # EKR
#@-node:@file .pycheckrc
#@-leo
