.pylintrc
changeset 546 419b08030903
parent 312 fc29a6c443ba
equal deleted inserted replaced
545:3cbd32a78761 546:419b08030903
     1 # Brain-dead errors regarding standard language features
     1 [MASTER]
     2 #   W0142 = *args and **kwargs support
     2 
     3 #   W0403 = Relative imports
     3 # Specify a configuration file.
     4 
     4 #rcfile=
     5 # Pointless whinging
     5 
     6 #   R0201 = Method could be a function
     6 # Python code to execute, usually for sys.path manipulation such as
     7 #   W0212 = Accessing protected attribute of client class
     7 # pygtk.require().
     8 #   W0613 = Unused argument
     8 #init-hook=
     9 #   W0232 = Class has no __init__ method
     9 
    10 #   R0903 = Too few public methods
    10 # Profiled execution.
    11 #   C0301 = Line too long
    11 profile=no
    12 #   R0913 = Too many arguments
    12 
    13 #   C0103 = Invalid name
    13 # Add files or directories to the blacklist. They should be base names, not
    14 #   R0914 = Too many local variables
    14 # paths.
    15 
    15 ignore=CVS
    16 # PyLint's module importation is unreliable
    16 
    17 #   F0401 = Unable to import module
    17 # Pickle collected data for later comparisons.
    18 #   W0402 = Uses of a deprecated module
    18 persistent=yes
    19 
    19 
    20 # Already an error when wildcard imports are used
    20 # List of plugins (as comma separated values of python modules names) to load,
    21 #   W0614 = Unused import from wildcard
    21 # usually to register additional checkers.
    22 
    22 load-plugins=
    23 # Sometimes disabled depending on how bad a module is
    23 
    24 #   C0111 = Missing docstring
    24 
    25 
    25 [MESSAGES CONTROL]
    26 # Disable the message(s) with the given id(s).
    26 
    27 disable-msg=W0142,W0403,R0201,W0212,W0613,W0232,R0903,W0614,C0111,C0301,R0913,C0103,F0401,W0402,R0914
    27 # Enable the message, report, category or checker with the given id(s). You can
    28 
    28 # either give multiple identifier separated by comma (,) or put this option
       
    29 # multiple time.
       
    30 #enable=
       
    31 
       
    32 # Disable the message, report, category or checker with the given id(s). You
       
    33 # can either give multiple identifier separated by comma (,) or put this option
       
    34 # multiple time (only on the command line, not in the configuration file where
       
    35 # it should appear only once).
       
    36 #disable=
       
    37 
       
    38 
       
    39 [REPORTS]
       
    40 
       
    41 # Set the output format. Available formats are text, parseable, colorized, msvs
       
    42 # (visual studio) and html
       
    43 output-format=text
       
    44 
       
    45 # Include message's id in output
       
    46 include-ids=no
       
    47 
       
    48 # Put messages in a separate file for each module / package specified on the
       
    49 # command line instead of printing them on stdout. Reports (if any) will be
       
    50 # written in a file name "pylint_global.[txt|html]".
       
    51 files-output=no
       
    52 
       
    53 # Tells whether to display a full report or only the messages
       
    54 reports=yes
       
    55 
       
    56 # Python expression which should return a note less than 10 (10 is the highest
       
    57 # note). You have access to the variables errors warning, statement which
       
    58 # respectively contain the number of errors / warnings messages and the total
       
    59 # number of statements analyzed. This is used by the global evaluation report
       
    60 # (RP0004).
       
    61 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
       
    62 
       
    63 # Add a comment according to your evaluation note. This is used by the global
       
    64 # evaluation report (RP0004).
       
    65 comment=no
       
    66 
       
    67 
       
    68 [VARIABLES]
       
    69 
       
    70 # Tells whether we should check for unused import in __init__ files.
       
    71 init-import=no
       
    72 
       
    73 # A regular expression matching the beginning of the name of dummy variables
       
    74 # (i.e. not used).
       
    75 dummy-variables-rgx=_|dummy
       
    76 
       
    77 # List of additional names supposed to be defined in builtins. Remember that
       
    78 # you should avoid to define new builtins when possible.
       
    79 additional-builtins=
       
    80 
       
    81 
       
    82 [SIMILARITIES]
       
    83 
       
    84 # Minimum lines number of a similarity.
       
    85 min-similarity-lines=4
       
    86 
       
    87 # Ignore comments when computing similarities.
       
    88 ignore-comments=yes
       
    89 
       
    90 # Ignore docstrings when computing similarities.
       
    91 ignore-docstrings=yes
       
    92 
       
    93 
       
    94 [BASIC]
       
    95 
       
    96 # Required attributes for module, separated by a comma
       
    97 required-attributes=
       
    98 
       
    99 # List of builtins function names that should not be used, separated by a comma
       
   100 bad-functions=map,filter,apply,input
       
   101 
       
   102 # Regular expression which should only match correct module names
       
   103 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
       
   104 
       
   105 # Regular expression which should only match correct module level names
       
   106 const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
       
   107 
       
   108 # Regular expression which should only match correct class names
       
   109 class-rgx=[A-Z_][a-zA-Z0-9]+$
       
   110 
       
   111 # Regular expression which should only match correct function names
       
   112 function-rgx=[a-z_][a-z0-9_]{2,30}$
       
   113 
       
   114 # Regular expression which should only match correct method names
       
   115 method-rgx=[a-z_][a-z0-9_]{2,30}$
       
   116 
       
   117 # Regular expression which should only match correct instance attribute names
       
   118 attr-rgx=[a-z_][a-z0-9_]{2,30}$
       
   119 
       
   120 # Regular expression which should only match correct argument names
       
   121 argument-rgx=[a-z_][a-z0-9_]{2,30}$
       
   122 
       
   123 # Regular expression which should only match correct variable names
       
   124 variable-rgx=[a-z_][a-z0-9_]{2,30}$
       
   125 
       
   126 # Regular expression which should only match correct list comprehension /
       
   127 # generator expression variable names
       
   128 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
       
   129 
       
   130 # Good variable names which should always be accepted, separated by a comma
       
   131 good-names=i,j,k,ex,Run,_
       
   132 
       
   133 # Bad variable names which should always be refused, separated by a comma
       
   134 bad-names=foo,bar,baz,toto,tutu,tata
       
   135 
       
   136 # Regular expression which should only match functions or classes name which do
       
   137 # not require a docstring
       
   138 no-docstring-rgx=__.*__
       
   139 
       
   140 
       
   141 [MISCELLANEOUS]
       
   142 
       
   143 # List of note tags to take in consideration, separated by a comma.
       
   144 notes=FIXME,XXX,TODO
       
   145 
       
   146 
       
   147 [FORMAT]
       
   148 
       
   149 # Maximum number of characters on a single line.
       
   150 max-line-length=80
       
   151 
       
   152 # Maximum number of lines in a module
       
   153 max-module-lines=1000
       
   154 
       
   155 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
       
   156 # tab).
       
   157 indent-string='    '
       
   158 
       
   159 
       
   160 [TYPECHECK]
       
   161 
       
   162 # Tells whether missing members accessed in mixin class should be ignored. A
       
   163 # mixin class is detected if its name ends with "mixin" (case insensitive).
       
   164 ignore-mixin-members=yes
       
   165 
       
   166 # List of classes names for which member attributes should not be checked
       
   167 # (useful for classes with attributes dynamically set).
       
   168 ignored-classes=SQLObject
       
   169 
       
   170 # When zope mode is activated, add a predefined set of Zope acquired attributes
       
   171 # to generated-members.
       
   172 zope=no
       
   173 
       
   174 # List of members which are set dynamically and missed by pylint inference
       
   175 # system, and so shouldn't trigger E0201 when accessed. Python regular
       
   176 # expressions are accepted.
       
   177 generated-members=REQUEST,acl_users,aq_parent
       
   178 
       
   179 
       
   180 [DESIGN]
       
   181 
       
   182 # Maximum number of arguments for function / method
       
   183 max-args=5
       
   184 
       
   185 # Argument names that match this expression will be ignored. Default to name
       
   186 # with leading underscore
       
   187 ignored-argument-names=_.*
       
   188 
       
   189 # Maximum number of locals for function / method body
       
   190 max-locals=15
       
   191 
       
   192 # Maximum number of return / yield for function / method body
       
   193 max-returns=6
       
   194 
       
   195 # Maximum number of branch for function / method body
       
   196 max-branchs=12
       
   197 
       
   198 # Maximum number of statements in function / method body
       
   199 max-statements=50
       
   200 
       
   201 # Maximum number of parents for a class (see R0901).
       
   202 max-parents=7
       
   203 
       
   204 # Maximum number of attributes for a class (see R0902).
       
   205 max-attributes=7
       
   206 
       
   207 # Minimum number of public methods for a class (see R0903).
       
   208 min-public-methods=2
       
   209 
       
   210 # Maximum number of public methods for a class (see R0904).
       
   211 max-public-methods=20
       
   212 
       
   213 
       
   214 [CLASSES]
       
   215 
       
   216 # List of interface methods to ignore, separated by a comma. This is used for
       
   217 # instance to not check methods defines in Zope's Interface base class.
       
   218 ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
       
   219 
       
   220 # List of method names used to declare (i.e. assign) instance attributes.
       
   221 defining-attr-methods=__init__,__new__,setUp
       
   222 
       
   223 # List of valid names for the first argument in a class method.
       
   224 valid-classmethod-first-arg=cls
       
   225 
       
   226 
       
   227 [IMPORTS]
       
   228 
       
   229 # Deprecated modules which should not be used, separated by a comma
       
   230 deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
       
   231 
       
   232 # Create a graph of every (i.e. internal and external) dependencies in the
       
   233 # given file (report RP0402 must not be disabled)
       
   234 import-graph=
       
   235 
       
   236 # Create a graph of external dependencies in the given file (report RP0402 must
       
   237 # not be disabled)
       
   238 ext-import-graph=
       
   239 
       
   240 # Create a graph of internal dependencies in the given file (report RP0402 must
       
   241 # not be disabled)
       
   242 int-import-graph=
       
   243 
       
   244 
       
   245 [EXCEPTIONS]
       
   246 
       
   247 # Exceptions that will emit a warning when being caught. Defaults to
       
   248 # "Exception"
       
   249 overgeneral-exceptions=Exception