|
| 1 | +# lint Python modules using external checkers. |
| 2 | +# |
| 3 | +# This is the main checker controlling 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 | +# Python code to execute, usually for sys.path manipulation such as |
| 15 | +# pygtk.require(). |
| 16 | +#init-hook= |
| 17 | + |
| 18 | +# Profiled execution. |
| 19 | +profile=no |
| 20 | + |
| 21 | +# Add <file or directory> to the black list. It should be a base name, not a |
| 22 | +# path. You may set this option multiple times. |
| 23 | +# Steve: "Lies! If you set this multiple times, the last one wins." |
| 24 | +ignore=migrations |
| 25 | + |
| 26 | +# Pickle collected data for later comparisons. |
| 27 | +persistent=yes |
| 28 | + |
| 29 | +# Set the cache size for astng objects. |
| 30 | +cache-size=500 |
| 31 | + |
| 32 | +# List of plugins (as comma separated values of python modules names) to load, |
| 33 | +# usually to register additional checkers. |
| 34 | +load-plugins= |
| 35 | + |
| 36 | + |
| 37 | +[MESSAGES CONTROL] |
| 38 | + |
| 39 | +# Enable only checker(s) with the given id(s). This option conflicts with the |
| 40 | +# disable-checker option |
| 41 | +#enable-checker= |
| 42 | + |
| 43 | +# Enable all checker(s) except those with the given id(s). This option |
| 44 | +# conflicts with the enable-checker option |
| 45 | +#disable-checker= |
| 46 | + |
| 47 | +# Enable all messages in the listed categories (IRCWEF). |
| 48 | +#enable-msg-cat= |
| 49 | + |
| 50 | +# Disable all messages in the listed categories (IRCWEF). |
| 51 | +disable-msg-cat=I |
| 52 | + |
| 53 | +# Enable the message(s) with the given id(s). |
| 54 | +#enable-msg= |
| 55 | + |
| 56 | +# Disable the message(s) with the given id(s). |
| 57 | +disable=W0704,W0201,W0142,W0232,R0903,C0301,E1102,W0105,W0221,R0904,I0011 |
| 58 | + |
| 59 | + |
| 60 | +[REPORTS] |
| 61 | + |
| 62 | +# Set the output format. Available formats are text, parseable, colorized, msvs |
| 63 | +# (visual studio) and html |
| 64 | +output-format=text |
| 65 | + |
| 66 | +# Include message's id in output |
| 67 | +include-ids=yes |
| 68 | + |
| 69 | +# Put messages in a separate file for each module / package specified on the |
| 70 | +# command line instead of printing them on stdout. Reports (if any) will be |
| 71 | +# written in a file name "pylint_global.[txt|html]". |
| 72 | +files-output=no |
| 73 | + |
| 74 | +# Tells wether to display a full report or only the messages |
| 75 | +reports=yes |
| 76 | + |
| 77 | +# Python expression which should return a note less than 10 (10 is the highest |
| 78 | +# note). You have access to the variables errors warning, statement which |
| 79 | +# respectivly contain the number of errors / warnings messages and the total |
| 80 | +# number of statements analyzed. This is used by the global evaluation report |
| 81 | +# (R0004). |
| 82 | +evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) |
| 83 | + |
| 84 | +# Add a comment according to your evaluation note. This is used by the global |
| 85 | +# evaluation report (R0004). |
| 86 | +comment=no |
| 87 | + |
| 88 | +# Enable the report(s) with the given id(s). |
| 89 | +#enable-report= |
| 90 | + |
| 91 | +# Disable the report(s) with the given id(s). |
| 92 | +#disable-report= |
| 93 | + |
| 94 | + |
| 95 | +# checks for : |
| 96 | +# * doc strings |
| 97 | +# * modules / classes / functions / methods / arguments / variables name |
| 98 | +# * number of arguments, local variables, branchs, returns and statements in |
| 99 | +# functions, methods |
| 100 | +# * required module attributes |
| 101 | +# * dangerous default values as arguments |
| 102 | +# * redefinition of function / method / class |
| 103 | +# * uses of the global statement |
| 104 | +# |
| 105 | +[BASIC] |
| 106 | + |
| 107 | +# Required attributes for module, separated by a comma |
| 108 | +required-attributes= |
| 109 | + |
| 110 | +# Regular expression which should only match functions or classes name which do |
| 111 | +# not require a docstring |
| 112 | +no-docstring-rgx=__.*__|get_absolute_url|save|delete|clean|clean_*|Meta |
| 113 | + |
| 114 | +# Regular expression which should only match correct module names |
| 115 | +module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ |
| 116 | + |
| 117 | +# Regular expression which should only match correct module level names |
| 118 | +const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ |
| 119 | + |
| 120 | +# Regular expression which should only match correct class names |
| 121 | +class-rgx=[A-Z_][a-zA-Z0-9]+$ |
| 122 | + |
| 123 | +# Regular expression which should only match correct function names |
| 124 | +function-rgx=[a-z_][a-z0-9_]{2,30}$ |
| 125 | + |
| 126 | +# Regular expression which should only match correct method names |
| 127 | +method-rgx=[a-z_][a-z0-9_]{2,30}$ |
| 128 | + |
| 129 | +# Regular expression which should only match correct instance attribute names |
| 130 | +attr-rgx=[a-z_][a-z0-9_]{2,30}$ |
| 131 | + |
| 132 | +# Regular expression which should only match correct argument names |
| 133 | +argument-rgx=[a-z_][a-z0-9_]{2,30}$ |
| 134 | + |
| 135 | +# Regular expression which should only match correct variable names |
| 136 | +variable-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}$) |
| 137 | + |
| 138 | +# Regular expression which should only match correct list comprehension / |
| 139 | +# generator expression variable names |
| 140 | +inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ |
| 141 | + |
| 142 | +# Good variable names which should always be accepted, separated by a comma |
| 143 | +good-names=i,j,k,v,qs,urlpatterns,register,p,a,t,r,u,x,f,e,setUp,tearDown |
| 144 | + |
| 145 | +# Bad variable names which should always be refused, separated by a comma |
| 146 | +bad-names=foo,bar,baz,toto,tutu,tata |
| 147 | + |
| 148 | +# List of builtins function names that should not be used, separated by a comma |
| 149 | +bad-functions=map,filter,apply,input |
| 150 | + |
| 151 | + |
| 152 | +# try to find bugs in the code using type inference |
| 153 | +# |
| 154 | +[TYPECHECK] |
| 155 | + |
| 156 | +# Tells wether missing members accessed in mixin class should be ignored. A |
| 157 | +# mixin class is detected if its name ends with "mixin" (case insensitive). |
| 158 | +ignore-mixin-members=yes |
| 159 | + |
| 160 | +# List of classes names for which member attributes should not be checked |
| 161 | +# (useful for classes with attributes dynamicaly set). |
| 162 | +ignored-classes=SQLObject |
| 163 | + |
| 164 | +# When zope mode is activated, add a predefined set of Zope acquired attributes |
| 165 | +# to generated-members. |
| 166 | +zope=no |
| 167 | + |
| 168 | +# List of members which are set dynamically and missed by pylint inference |
| 169 | +# system, and so shouldn't trigger E0201 when accessed. |
| 170 | +generated-members=objects,DoesNotExist,MultipleObjectsReturned,id,pk,save,all,distinct,filter,values_list,_default_manager,_meta,change_password,connect,_service_list,_signals,base_fields,content,request,status_code,templates,_container,_headers,path,business,coupons,offers,headline,orders,is_locked,order_items,promotion,promotion_codes,payments,mobile_phones,consumer_actions,increment_used_count,add,count,delay,apply_async,get_status_display,slot_time_frames,child_slots,context,businesses,default_state_province,default_state_province_id,location,offer,coupon_type,get_site,site_id,location_coordinate,get_location_coords_list,flyer_coupons,flyer_placement,flyer_placements,get_location_string,business_profile_description,get_or_set_consumer_count,through,consumers,isocalendar,site,send_date,is_active,is_approved,start_date,end_date,password,email,first_name,feed_provider,external_id,index_coupons,split,order,ad_rep,last_name,bonus_pool_allocations,coupon_actions,coupon_create_datetime,update_index,get_municipality_division |
| 171 | + |
| 172 | + |
| 173 | +# checks for |
| 174 | +# * unused variables / imports |
| 175 | +# * undefined variables |
| 176 | +# * redefinition of variable from builtins or from an outer scope |
| 177 | +# * use of variable before assigment |
| 178 | +# |
| 179 | +[VARIABLES] |
| 180 | + |
| 181 | +# Tells wether we should check for unused import in __init__ files. |
| 182 | +init-import=no |
| 183 | + |
| 184 | +# A regular expression matching names used for dummy variables (i.e. not used). |
| 185 | +dummy-variables-rgx=_|dummy |
| 186 | + |
| 187 | +# List of additional names supposed to be defined in builtins. Remember that |
| 188 | +# you should avoid to define new builtins when possible. |
| 189 | +additional-builtins= |
| 190 | + |
| 191 | + |
| 192 | +# checks for : |
| 193 | +# * methods without self as first argument |
| 194 | +# * overridden methods signature |
| 195 | +# * access only to existant members via self |
| 196 | +# * attributes not defined in the __init__ method |
| 197 | +# * supported interfaces implementation |
| 198 | +# * unreachable code |
| 199 | +# |
| 200 | +[CLASSES] |
| 201 | + |
| 202 | +# List of interface methods to ignore, separated by a comma. This is used for |
| 203 | +# instance to not check methods defines in Zope's Interface base class. |
| 204 | +ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by |
| 205 | + |
| 206 | +# List of method names used to declare (i.e. assign) instance attributes. |
| 207 | +defining-attr-methods=__init__,__new__,setUp |
| 208 | + |
| 209 | + |
| 210 | +# checks for sign of poor/misdesign: |
| 211 | +# * number of methods, attributes, local variables... |
| 212 | +# * size, complexity of functions, methods |
| 213 | +# |
| 214 | +[DESIGN] |
| 215 | + |
| 216 | +# Maximum number of arguments for function / method |
| 217 | +max-args=5 |
| 218 | + |
| 219 | +# Maximum number of locals for function / method body |
| 220 | +max-locals=15 |
| 221 | + |
| 222 | +# Maximum number of return / yield for function / method body |
| 223 | +max-returns=6 |
| 224 | + |
| 225 | +# Maximum number of branch for function / method body |
| 226 | +max-branchs=12 |
| 227 | + |
| 228 | +# Maximum number of statements in function / method body |
| 229 | +max-statements=50 |
| 230 | + |
| 231 | +# Maximum number of parents for a class (see R0901). |
| 232 | +max-parents=7 |
| 233 | + |
| 234 | +# Maximum number of attributes for a class (see R0902). |
| 235 | +max-attributes=7 |
| 236 | + |
| 237 | +# Minimum number of public methods for a class (see R0903). |
| 238 | +min-public-methods=2 |
| 239 | + |
| 240 | +# Maximum number of public methods for a class (see R0904). |
| 241 | +max-public-methods=20 |
| 242 | + |
| 243 | + |
| 244 | +# checks for |
| 245 | +# * external modules dependencies |
| 246 | +# * relative / wildcard imports |
| 247 | +# * cyclic imports |
| 248 | +# * uses of deprecated modules |
| 249 | +# |
| 250 | +[IMPORTS] |
| 251 | + |
| 252 | +# Deprecated modules which should not be used, separated by a comma |
| 253 | +deprecated-modules=regsub,string,TERMIOS,Bastion,rexec |
| 254 | + |
| 255 | +# Create a graph of every (i.e. internal and external) dependencies in the |
| 256 | +# given file (report R0402 must not be disabled) |
| 257 | +import-graph= |
| 258 | + |
| 259 | +# Create a graph of external dependencies in the given file (report R0402 must |
| 260 | +# not be disabled) |
| 261 | +ext-import-graph= |
| 262 | + |
| 263 | +# Create a graph of internal dependencies in the given file (report R0402 must |
| 264 | +# not be disabled) |
| 265 | +int-import-graph= |
| 266 | + |
| 267 | + |
| 268 | +# checks for : |
| 269 | +# * unauthorized constructions |
| 270 | +# * strict indentation |
| 271 | +# * line length |
| 272 | +# * use of <> instead of != |
| 273 | +# |
| 274 | +[FORMAT] |
| 275 | + |
| 276 | +# Maximum number of characters on a single line. |
| 277 | +max-line-length=120 |
| 278 | + |
| 279 | +# Maximum number of lines in a module |
| 280 | +max-module-lines=1000 |
| 281 | + |
| 282 | +# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 |
| 283 | +# tab). |
| 284 | +indent-string=' ' |
| 285 | + |
| 286 | + |
| 287 | +# checks for: |
| 288 | +# * warning notes in the code like FIXME, XXX |
| 289 | +# * PEP 263: source code with non ascii character but no encoding declaration |
| 290 | +# |
| 291 | +[MISCELLANEOUS] |
| 292 | + |
| 293 | +# List of note tags to take in consideration, separated by a comma. |
| 294 | +notes=FIXME,XXX,TODO |
| 295 | + |
| 296 | + |
| 297 | +# checks for similarities and duplicated code. This computation may be |
| 298 | +# memory / CPU intensive, so you should disable it if you experiments some |
| 299 | +# problems. |
| 300 | +# |
| 301 | +[SIMILARITIES] |
| 302 | + |
| 303 | +# Minimum lines number of a similarity. |
| 304 | +min-similarity-lines=4 |
| 305 | + |
| 306 | +# Ignore comments when computing similarities. |
| 307 | +ignore-comments=yes |
| 308 | + |
| 309 | +# Ignore docstrings when computing similarities. |
| 310 | +ignore-docstrings=yes |
| 311 | + |
| 312 | + |
0 commit comments