1 # lint Python modules using external checkers. 2 # 3 # This is the main checker controling the other ones and the reports 4 # generation. It is itself both a raw checker and an astng checker in order 5 # to: 6 # * handle message activation / deactivation at the module level 7 # * handle some basic but necessary stats'data (number of classes, methods...) 8 # 9 [MASTER] 10 11 # Specify a configuration file. 12 #rcfile= 13 14 # Profiled execution. 15 profile=no 16 17 # Add <file or directory> to the black list. It should be a base name, not a 18 # path. You may set this option multiple times. 19 ignore=CVS 20 21 # Pickle collected data for later comparisons. 22 persistent=yes 23 24 # Set the cache size for astng objects. 25 cache-size=500 26 27 # List of plugins (as comma separated values of python modules names) to load, 28 # usually to register additional checkers. 29 load-plugins= 30 31 32 [COMMANDS] 33 34 # Display a help message for the given message id and exit. The value may be a 35 # comma separated list of message ids. 36 #help-msg= 37 38 39 [MESSAGES CONTROL] 40 41 # Enable only checker(s) with the given id(s). This option conflict with the 42 # disable-checker option 43 #enable-checker= 44 45 # Enable all checker(s) except those with the given id(s). This option conflict 46 # with the disable-checker option 47 #disable-checker= 48 49 # Enable all messages in the listed categories. 50 #enable-msg-cat= 51 52 # Disable all messages in the listed categories. 53 #disable-msg-cat= 54 55 # Enable the message(s) with the given id(s). 56 #enable-msg= 57 58 # Disable the message(s) with the given id(s). 59 # W0622: Redefining built-in '...' 60 # C0103: Invalid name 61 # R0904: Too many public methods 62 # R0201: Method could be a function 63 # C0302: Too many lines in module 64 # R0902: Too many instance attributes 65 # R0913: Too many arguments 66 # R0912: Too many branches 67 # R0903: To few public methods 68 # C0111: Missing docstring 69 # W0403: Relative import 70 # W0401: Wildcard import 71 # W0142: */** magic 72 disable-msg=W0622, C0103, R0904, R0201, C0302, R0902, R0913, R0912, R0903, C0111, W0403, W0401, W0142 73 74 75 [REPORTS] 76 77 # set the output format. Available formats are text, parseable, colorized and 78 # html 79 output-format=text 80 81 # Include message's id in output 82 include-ids=yes 83 84 # Put messages in a separate file for each module / package specified on the 85 # command line instead of printing them on stdout. Reports (if any) will be 86 # written in a file name "pylint_global.[txt|html]". 87 files-output=no 88 89 # Tells wether to display a full report or only the messages 90 reports=yes 91 92 # Python expression which should return a note less than 10 (10 is the highest 93 # note).You have access to the variables errors warning, statement which 94 # respectivly contain the number of errors / warnings messages and the total 95 # number of statements analyzed. This is used by the global evaluation report 96 # (R0004). 97 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) 98 99 # Add a comment according to your evaluation note. This is used by the global 100 # evaluation report (R0004). 101 comment=no 102 103 # Enable the report(s) with the given id(s). 104 #enable-report= 105 106 # Disable the report(s) with the given id(s). 107 #disable-report= 108 109 110 # try to find bugs in the code using type inference 111 # 112 [TYPECHECK] 113 114 # Tells wether missing members accessed in mixin class should be ignored. A 115 # mixin class is detected if its name ends with "mixin" (case insensitive). 116 ignore-mixin-members=yes 117 118 # When zope mode is activated, consider the acquired-members option to ignore 119 # access to some undefined attributes. 120 zope=no 121 122 # List of members which are usually get through zope's acquisition mecanism and 123 # so shouldn't trigger E0201 when accessed (need zope=yes to be considered). 124 acquired-members=REQUEST,acl_users,aq_parent 125 126 127 # checks for 128 # * unused variables / imports 129 # * undefined variables 130 # * redefinition of variable from builtins or from an outer scope 131 # * use of variable before assigment 132 # 133 [VARIABLES] 134 135 # Tells wether we should check for unused import in __init__ files. 136 init-import=no 137 138 # A regular expression matching names used for dummy variables (i.e. not used). 139 dummy-variables-rgx=_|dummy 140 141 # List of additional names supposed to be defined in builtins. Remember that 142 # you should avoid to define new builtins when possible. 143 additional-builtins= 144 145 146 # checks for : 147 # * doc strings 148 # * modules / classes / functions / methods / arguments / variables name 149 # * number of arguments, local variables, branchs, returns and statements in 150 # functions, methods 151 # * required module attributes 152 # * dangerous default values as arguments 153 # * redefinition of function / method / class 154 # * uses of the global statement 155 # 156 [BASIC] 157 158 # Required attributes for module, separated by a comma 159 required-attributes= 160 161 # Regular expression which should only match functions or classes name which do 162 # not require a docstring 163 no-docstring-rgx=__.*__ 164 165 # Regular expression which should only match correct module names 166 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ 167 168 # Regular expression which should only match correct module level names 169 const-rgx=(([A-Z_][A-Z1-9_]*)|(__.*__))$ 170 171 # Regular expression which should only match correct class names 172 class-rgx=[A-Z_][a-zA-Z0-9]+$ 173 174 # Regular expression which should only match correct function names 175 function-rgx=[a-z_][a-z0-9_]{2,30}$ 176 177 # Regular expression which should only match correct method names 178 method-rgx=[a-z_][a-z0-9_]{2,30}$ 179 180 # Regular expression which should only match correct instance attribute names 181 attr-rgx=[a-z_][a-z0-9_]{2,30}$ 182 183 # Regular expression which should only match correct argument names 184 argument-rgx=[a-z_][a-z0-9_]{2,30}$ 185 186 # Regular expression which should only match correct variable names 187 variable-rgx=[a-z_][a-z0-9_]{2,30}$ 188 189 # Regular expression which should only match correct list comprehension / 190 # generator expression variable names 191 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ 192 193 # Good variable names which should always be accepted, separated by a comma 194 good-names=i,j,k,ex,Run,_ 195 196 # Bad variable names which should always be refused, separated by a comma 197 bad-names=foo,bar,baz,toto,tutu,tata 198 199 # List of builtins function names that should not be used, separated by a comma 200 bad-functions=map,filter,apply,input 201 202 203 # checks for sign of poor/misdesign: 204 # * number of methods, attributes, local variables... 205 # * size, complexity of functions, methods 206 # 207 [DESIGN] 208 209 # Maximum number of arguments for function / method 210 max-args=5 211 212 # Maximum number of locals for function / method body 213 max-locals=15 214 215 # Maximum number of return / yield for function / method body 216 max-returns=6 217 218 # Maximum number of branch for function / method body 219 max-branchs=12 220 221 # Maximum number of statements in function / method body 222 max-statements=50 223 224 # Maximum number of parents for a class (see R0901). 225 max-parents=7 226 227 # Maximum number of attributes for a class (see R0902). 228 max-attributes=7 229 230 # Minimum number of public methods for a class (see R0903). 231 min-public-methods=2 232 233 # Maximum number of public methods for a class (see R0904). 234 max-public-methods=20 235 236 237 # checks for : 238 # * methods without self as first argument 239 # * overridden methods signature 240 # * access only to existant members via self 241 # * attributes not defined in the __init__ method 242 # * supported interfaces implementation 243 # * unreachable code 244 # 245 [CLASSES] 246 247 # List of interface methods to ignore, separated by a comma. This is used for 248 # instance to not check methods defines in Zope's Interface base class. 249 ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by 250 251 # List of method names used to declare (i.e. assign) instance attributes. 252 defining-attr-methods=__init__,__new__,setUp 253 254 255 # checks for 256 # * external modules dependencies 257 # * relative / wildcard imports 258 # * cyclic imports 259 # * uses of deprecated modules 260 # 261 [IMPORTS] 262 263 # Deprecated modules which should not be used, separated by a comma 264 deprecated-modules=regsub,string,TERMIOS,Bastion,rexec 265 266 # Create a graph of every (i.e. internal and external) dependencies in the 267 # given file (report R0402 must not be disabled) 268 import-graph= 269 270 # Create a graph of external dependencies in the given file (report R0402 must 271 # not be disabled) 272 ext-import-graph= 273 274 # Create a graph of internal dependencies in the given file (report R0402 must 275 # not be disabled) 276 int-import-graph= 277 278 279 # checks for similarities and duplicated code. This computation may be 280 # memory / CPU intensive, so you should disable it if you experiments some 281 # problems. 282 # 283 [SIMILARITIES] 284 285 # Minimum lines number of a similarity. 286 min-similarity-lines=4 287 288 # Ignore comments when computing similarities. 289 ignore-comments=yes 290 291 # Ignore docstrings when computing similarities. 292 ignore-docstrings=yes 293 294 295 # checks for : 296 # * unauthorized constructions 297 # * strict indentation 298 # * line length 299 # * use of <> instead of != 300 # 301 [FORMAT] 302 303 # Maximum number of characters on a single line. 304 max-line-length=80 305 306 # Maximum number of lines in a module 307 max-module-lines=1000 308 309 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 310 # tab). 311 indent-string=' ' 312 313 314 # checks for: 315 # * warning notes in the code like FIXME, XXX 316 # * PEP 263: source code with non ascii character but no encoding declaration 317 # 318 [MISCELLANEOUS] 319 320 # List of note tags to take in consideration, separated by a comma. 321 notes=FIXME,XXX,TODO 322