# This is pylint settings file for Leo itself.

# leo/test/pylint-leo-rc.txt or leo/test/pylint-leo-rc-ref.txt

# For documentation, see: https://docs.pylint.org/features.html#typecheck-checker

# Handle message activation / deactivation at the module level
# Nandle some basic stats data

[MASTER]

# Specify a configuration file.
#rcfile=

# Python code to execute, usually for sys.path manipulation
#init-hook=

# Add <file or directory> to the black list. A base name, not a path.
# You may set this option multiple times.
ignore=
    CVS
    .git

# Pickle collected data for later comparisons.
persistent=yes

# Set the cache size for astng objects.
cache-size=500

# List of plugins (as comma separated values of python modules names) to load,
# usually to register additional checkers.
load-plugins=

[MESSAGES CONTROL]

# Enable the message, report, category or checker with the given id(s).
#enable=

# Disable the message, report, category or checker with the given id(s).
disable=
    design,import,format,similarities,
    attribute-defined-outside-init,
    bad-builtin,
    bad-continuation,
    bad-option-value,
    bad-whitespace,
    broad-except,
    consider-iterating-dictionary,
    consider-using-enumerate,
    consider-using-ternary,
    deprecated-module,
    exec-used,
    global-statement,
    global-variable-not-assigned,
    import-error,
    line-too-long,
    locally-disabled,
    misplaced-comparison-constant,
    missing-docstring,
    multiple-statements,
    no-else-return,
    no-init,
    no-self-use,
    old-style-class,
    protected-access,
    redefined-builtin,
    redefined-outer-name,
    redefined-variable-type,
    redefined-argument-from-local,
    reimported,
    simplifiable-if-statement,
    singleton-comparison,
    superfluous-parens,
    too-few-public-methods,
    trailing-whitespace,
    ungrouped-imports,
    unused-argument,
    unused-variable,
    using-constant-test,
    wrong-import-position,
    wrong-import-order,
    
# Categories:
# basic,classes,design,import,format,similarities,typecheck,variables

# Notes:
# - trailing whitespace can happen because of @others.
#   This could be called a bug in the @others logic.
# - line-too-long can happen because of @others.
# - global-statement: Assume we know what we are doing.
# - superfluous-parens: must be disabled for Python 3 code.

# Previously disabled...
# assignment-from-no-return,
# dangerous-default-value, # should *never* be disabled.
# import-self,
# misplaced-bare-raise,
# super-init-not-called,
# undefined-loop-variable,
# unidiomatic-typecheck, # very bad style.
# wildcard-import,

[REPORTS]

# set the output format.
# Available formats are text, parseable, colorized, msvs (visual studio) and html
output-format=text

# Put messages in a separate file for each module / package specified on the
# command line instead of printing them on stdout. Reports (if any) will be
# written in a file name "pylint_global.[txt|html]".
files-output=no

# Tells wether to display a full report or only the messages
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
# respectivly contain the number of errors / warnings messages and the total
# number of statements analyzed. This is used by the global evaluation report
# (R0004).

evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)

# Deactivate the evaluation score.
score=no

# Enable the report(s) with the given id(s).
# enable-report=

# Disable the report(s) with the given id(s).
# R0001,Messages by category
# R0002 % errors / warnings by module
# R0003 Messages
# R0004 Global evaluation

# R0101 Statistics by type
# R0401 External dependencies
# R0402 graph ofinternal and externaldependencies
# R0701 Raw metrics
# R0801 Duplication

disable-report=R0001,R0002,R0003,R0004,R0101,R0401,R0402,R0701,R0801

[BASIC]

# Regular expression which should only match functions or classes name which do
# not require a docstring
no-docstring-rgx=__.*__

# Regular expression which should only match correct module names
# module-rgx=(([a-z_][a-z0-9_]*)|([a-zA-Z0-9]+))$
module-rgx=[a-zA-Z][a-zA-Z0-9_]+$

# Regular expression which should only match correct module level names
#const-rgx=(([A-Z_][A-Z1-9_]*)|(__.*__))$
const-rgx=(([a-zA-Z_][a-zA-Z0-9_]+)|(__.*__))$

# Regular expression which should only match correct class names
# class-rgx=[A-Z_][a-zA-Z0-9]+$
class-rgx=[a-zA-Z_][a-zA-Z0-9_]+$

# Regular expression which should only match correct function names
# function-rgx=[a-z_][a-z0-9_]{2,30}$
function-rgx=[a-zA-Z_][a-zA-Z0-9_]*$

# Regular expression which should only match correct method names
#method-rgx=[a-z_][a-z0-9_]{2,30}$
method-rgx=[a-zA-Z_][a-zA-Z0-9_]*$

# Regular expression which should only match correct instance attribute names
#attr-rgx=[a-z_][a-z0-9_]{2,30}$
attr-rgx=[a-zA-Z_][a-zA-Z0-9_]*$
class-attribute-rgx=[a-zA-Z_][a-zA-Z0-9_]*$

# Regular expression which should only match correct argument names
#argument-rgx=[a-z_][a-z0-9_]{2,30}$
argument-rgx=[a-zA-Z_][a-zA-Z0-9_]*$

# Regular expression which should only match correct variable names
#variable-rgx=[a-z_][a-z0-9_]{2,30}$
variable-rgx=[a-zA-Z_][a-zA-Z0-9_]*$

# Regular expression which should only match correct list comprehension /
# generator expression variable names
#inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
inlinvar-rgx=[a-zA-Z][a-zA-Z0-9_]*$

# Good variable names which should always be accepted, separated by a comma
good-names=_,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z

#__pychecker__,__version__,\
#__not_a_plugin__,__plugin_id__,__plugin_name__,__plugin_priority__,__plugin_group__,__plugin_requires__,\
#__revision__,__author__,__date__,__cvsid__,\
#_emacs_cmd,_vim_cmd,_vim_exe,\
#_AssignUniqueConstantValue,_PluginDatabase

# Bad variable names which should always be refused, separated by a comma
bad-names=foo,baz,toto,tutu,tata

# List of builtins function names that should not be used, separated by a comma
bad-functions=map,filter,apply,input

[TYPECHECK]

# Tells wether missing members accessed in mixin class should be ignored.
# Mixin classes have names ending in "mixin" (case insensitive).
ignore-mixin-members=yes

# Members which are usually get through zope's acquisition mecanism and
# so shouldn't trigger E0201 when accessed (need zope=yes to be considered).
acquired-members=REQUEST,acl_users,aq_parent

# Members which are set dynamically and missed by pylint inference system...

extension-pkg-whitelist=PyQt4, PyQt5, lxml.etree

[VARIABLES]

# Tells wether we should check for unused import in __init__ files.
init-import=no

# A regular expression matching names used for dummy variables (i.e. not used).
dummy-variables-rgx=_|dummy|junk|args|keys|keywords|event|tag|unused_.*

# List of additional names supposed to be defined in builtins.
# Avoid defining new builtins when possible.
additional-builtins=

[CLASSES]

# List of method names used to declare (i.e. assign) instance attributes.
# EKR: the last item in the list does not work properly: I added a dummy.
defining-attr-methods=__init__,__new__,setUp,init,finishCreate,initReadIvars,initWriteIvars,initCommonIvars,initIvars,dummy_init

[DESIGN]

# EKR: These aren't used because all design checks are disabled.
# The enabled numbers are the defaults.

# Maximum number of arguments for function / method
max-args=5
# max-args=20

# Maximum number of boolean expressions in a if statement
max-bool-expr=5
# max-bool-expr=20

# Maximum number of locals for function / method body
max-locals=15
# max-locals=100

# Maximum number of nested blocks for function / method body
max-nested-blocks=10

# Maximum number of return / yield for function / method body
max-returns=6
# max-returns=50

# Maximum number of branch for function / method body
max-branches=12
# max-branches=100

# Maximum number of statements in function / method body
max-statements=50
# max-statements=500

# Maximum number of parents for a class (see R0901).
max-parents=7

# Maximum number of attributes for a class (see R0902).
max-attributes=7
# max-attributes=150

# Minimum number of public methods for a class (see R0903).
min-public-methods=2
# min-public-methods=1

# Maximum number of public methods for a class (see R0904).
max-public-methods=20
# max-public-methods=400

[IMPORTS]

# Deprecated modules which should not be used, separated by a comma
deprecated-modules=regsub,string,TERMIOS,Bastion,rexec

# Create a graph of internal and external dependencies in the given graph.
# (report R0402 must not be disabled)
# import-graph=no

# Create a graph of external dependencies in the given file
# (report R0402 must not be disabled)
ext-import-graph=no

# Create a graph of internal dependencies in the given file
# (report R0402 must not be disabled)
int-import-graph=no

[FORMAT]

# Maximum number of characters on a single line.
# max-line-length=80
max-line-length=120

# Maximum number of lines in a module
#max-module-lines=1000
max-module-lines=20000

# String used as indentation unit.
# This is usually " " (4 spaces) or "\t" (1 tab).
indent-string='    '

[MISCELLANEOUS]

# List of note tags to take in consideration, separated by a comma.
# notes=FIXME,XXX,TODO
notes=

# checks for similarities and duplicated code. May be expensive.

[SIMILARITIES]

# Minimum lines number of a similarity.
min-similarity-lines=4

# Ignore comments when computing similarities.
ignore-comments=yes

# Ignore docstrings when computing similarities.
ignore-docstrings=yes
