pylintrc 10.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
# ***************************
# ** DO NOT EDIT THIS FILE **
# ***************************
#
# This file was generated by edx-lint: http://github.com/edx/edx-lint
#
# If you want to change this file, you have two choices, depending on whether
# you want to make a local change that applies only to this repo, or whether
# you want to make a central change that applies to all repos using edx-lint.
#
# LOCAL CHANGE:
#
# 1. Edit the local pylintrc_tweaks file to add changes just to this
#    repo's file.
#
# 2. Run:
#
#       $ edx_lint write pylintrc
#
# 3. This will modify the local file.  Submit a pull request to get it
#    checked in so that others will benefit.
#
#
# CENTRAL CHANGE:
#
# 1. Edit the pylintrc file in the edx-lint repo at
#    https://github.com/edx/edx-lint/blob/master/edx_lint/files/pylintrc
#
# 2. Make a new version of edx_lint, which involves the usual steps of
#    incrementing the version number, submitting and reviewing a pull
#    request, and updating the edx-lint version reference in this repo.
#
# 3. Install the newer version of edx-lint.
#
# 4. Run:
#
#       $ edx_lint write pylintrc
#
# 5. This will modify the local file.  Submit a pull request to get it
#    checked in so that others will benefit.
#
#
#
#
#
# STAY AWAY FROM THIS FILE!
#
#
#
#
#
# SERIOUSLY.
#
# ------------------------------
[MASTER]
56
ignore = pavelib_test_code, migrations
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447
persistent = yes
load-plugins = edx_lint.pylint,pylint_django,pylint_celery

[MESSAGES CONTROL]
enable = 
	# These are controlled by explicit choices in the pylintrc files
	blacklisted-name,
	line-too-long,
	# These affect the correctness of the code
	syntax-error,
	init-is-generator,
	return-in-init,
	function-redefined,
	not-in-loop,
	return-outside-function,
	yield-outside-function,
	return-arg-in-generator,
	nonexistent-operator,
	duplicate-argument-name,
	abstract-class-instantiated,
	bad-reversed-sequence,
	continue-in-finally,
	method-hidden,
	access-member-before-definition,
	no-method-argument,
	no-self-argument,
	invalid-slots-object,
	assigning-non-slot,
	invalid-slots,
	inherit-non-class,
	inconsistent-mro,
	duplicate-bases,
	non-iterator-returned,
	unexpected-special-method-signature,
	invalid-length-returned,
	import-error,
	used-before-assignment,
	undefined-variable,
	undefined-all-variable,
	invalid-all-object,
	no-name-in-module,
	unbalance-tuple-unpacking,
	unpacking-non-sequence,
	bad-except-order,
	raising-bad-type,
	misplaced-bare-raise,
	raising-non-exception,
	nonimplemented-raised,
	catching-non-exception,
	slots-on-old-class,
	super-on-old-class,
	bad-super-call,
	missing-super-argument,
	no-member,
	not-callable,
	assignment-from-no-return,
	no-value-for-parameter,
	too-many-function-args,
	unexpected-keyword-arg,
	redundant-keyword-arg,
	invalid-sequence-index,
	invalid-slice-index,
	assignment-from-none,
	not-context-manager,
	invalid-unary-operand-type,
	unsupported-binary-operation,
	repeated-keyword,
	not-an-iterable,
	not-a-mapping,
	unsupported-membership-test,
	unsubscriptable-object,
	logging-unsupported-format,
	logging-too-many-args,
	logging-too-few-args,
	bad-format-character,
	truncated-format-string,
	mixed-fomat-string,
	format-needs-mapping,
	missing-format-string-key,
	too-many-format-args,
	too-few-format-args,
	bad-str-strip-call,
	model-unicode-not-callable,
	super-method-not-called,
	non-parent-method-called,
	test-inherits-tests,
	translation-of-non-string,
	redefined-variable-type,
	cyclical-import,
	unreachable,
	dangerous-default-value,
	pointless-statement,
	pointless-string-statement,
	expression-not-assigned,
	duplicate-key,
	confusing-with-statement,
	using-constant-test,
	lost-exception,
	assert-on-tuple,
	attribute-defined-outside-init,
	bad-staticmethod-argument,
	arguments-differ,
	signature-differs,
	abstract-method,
	super-init-not-called,
	relative-import,
	import-self,
	misplaced-future,
	invalid-encoded-data,
	global-variable-undefined,
	redefined-outer-name,
	redefined-builtin,
	redefined-in-handler,
	undefined-loop-variable,
	cell-var-from-loop,
	duplicate-except,
	nonstandard-exception,
	binary-op-exception,
	property-on-old-class,
	bad-format-string-key,
	unused-format-string-key,
	bad-format-string,
	missing-format-argument-key,
	unused-format-string-argument,
	format-combined-specification,
	missing-format-attribute,
	invalid-format-index,
	anomalous-backslash-in-string,
	anomalous-unicode-escape-in-string,
	bad-open-mode,
	boolean-datetime,
	# Checking failed for some reason
	fatal,
	astroid-error,
	parse-error,
	method-check-failed,
	django-not-available,
	raw-checker-failed,
	django-not-available-placeholder,
	# Documentation is important
	empty-docstring,
	invalid-characters-in-docstring,
	missing-docstring,
	wrong-spelling-in-comment,
	wrong-spelling-in-docstring,
	# Unused code should be deleted
	unused-import,
	unused-variable,
	unused-argument,
	# These are dangerous!
	exec-used,
	eval-used,
	# These represent idiomatic python. Not adhering to them
	# will raise red flags with future readers.
	bad-classmethod-argument,
	bad-mcs-classmethod-argument,
	bad-mcs-method-argument,
	bad-whitespace,
	consider-iterating-dictionary,
	consider-using-enumerate,
	literal-used-as-attribute,
	multiple-imports,
	multiple-statements,
	old-style-class,
	simplifiable-range,
	singleton-comparison,
	superfluous-parens,
	unidiomatic-typecheck,
	unneeded-not,
	wrong-assert-type,
	simplifiable-if-statement,
	no-classmethod-decorator,
	no-staticmethod-decorator,
	unnecessary-pass,
	unnecessary-lambda,
	useless-else-on-loop,
	unnecessary-semicolon,
	reimported,
	global-variable-not-assigned,
	global-at-module-level,
	bare-except,
	broad-except,
	logging-not-lazy,
	redundant-unittest-assert,
	model-missing-unicode,
	model-has-unicode,
	model-no-explicit-unicode,
	protected-access,
	# Don't use things that are deprecated
	deprecated-module,
	deprecated-method,
	# These help manage code complexity
	too-many-nested-blocks,
	too-many-statements,
	too-many-boolean-expressions,
	# Consistent import order makes finding where code is
	# imported from easier
	ungrouped-imports,
	wrong-import-order,
	wrong-import-position,
	wildcard-import,
	# These should be auto-fixed by any competent editor
	missing-final-newline,
	mixed-line-endings,
	trailing-newlines,
	trailing-whitespace,
	unexpected-line-ending-format,
	mixed-indentation,
	# These attempt to limit pylint line-noise
	bad-option-value,
	unrecognized-inline-option,
	useless-suppression,
	bad-inline-option,
	deprecated-pragma,
disable = 
	# These should be left to the discretion of the reviewer
	bad-continuation,
	invalid-name,
	misplaced-comparison-constant,
	file-ignored,
	bad-indentation,
	lowercase-l-suffix,
	unused-wildcard-import,
	global-statement,
	no-else-return,
	# These are disabled by pylint by default
	apply-builtin,
	backtick,
	basestring-builtin,
	buffer-builtin,
	cmp-builtin,
	cmp-method,
	coerce-builtin,
	coerce-method,
	delslice-method,
	dict-iter-method,
	dict-view-method,
	duplicate-code,
	execfile-builtin,
	file-builtin,
	filter-builtin-not-iterating,
	fixme,
	getslice-method,
	hex-method,
	import-star-module-level,
	indexing-exception,
	input-builtin,
	intern-builtin,
	locally-disabled,
	locally-enabled,
	logging-format-interpolation,
	long-builtin,
	long-suffix,
	map-builtin-not-iterating,
	metaclass-assignment,
	next-method-called,
	no-absolute-import,
	no-init,
	no-self-use,
	nonzero-method,
	oct-method,
	old-division,
	old-ne-operator,
	old-octal-literal,
	old-raise-syntax,
	parameter-unpacking,
	print-statement,
	raising-string,
	range-builtin-not-iterating,
	raw_input-builtin,
	reduce-builtin,
	reload-builtin,
	round-builtin,
	setslice-method,
	standarderror-builtin,
	suppressed-message,
	too-few-public-methods,
	too-many-ancestors,
	too-many-arguments,
	too-many-branches,
	too-many-instance-attributes,
	too-many-lines,
	too-many-locals,
	too-many-public-methods,
	too-many-return-statements,
	unichr-builtin,
	unicode-builtin,
	unpacking-in-except,
	using-cmp-argument,
	xrange-builtin,
	zip-builtin-not-iterating,

[REPORTS]
output-format = text
files-output = no
reports = no
evaluation = 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)

[BASIC]
bad-functions = map,filter,apply,input
module-rgx = (([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
const-rgx = (([A-Z_][A-Z0-9_]*)|(__.*__)|log|urlpatterns)$
class-rgx = [A-Z_][a-zA-Z0-9]+$
function-rgx = ([a-z_][a-z0-9_]{2,40}|test_[a-z0-9_]+)$
method-rgx = ([a-z_][a-z0-9_]{2,40}|setUp|set[Uu]pClass|tearDown|tear[Dd]ownClass|assert[A-Z]\w*|maxDiff|test_[a-z0-9_]+)$
attr-rgx = [a-z_][a-z0-9_]{2,30}$
argument-rgx = [a-z_][a-z0-9_]{2,30}$
variable-rgx = [a-z_][a-z0-9_]{2,30}$
class-attribute-rgx = ([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
inlinevar-rgx = [A-Za-z_][A-Za-z0-9_]*$
good-names = f,i,j,k,db,ex,Run,_,__
bad-names = foo,bar,baz,toto,tutu,tata
no-docstring-rgx = __.*__$|test_.+|setUp$|setUpClass$|tearDown$|tearDownClass$|Meta$
docstring-min-length = 5

[FORMAT]
max-line-length = 120
ignore-long-lines = ^\s*(# )?<?https?://\S+>?$
single-line-if-stmt = no
no-space-check = trailing-comma,dict-separator
max-module-lines = 1000
indent-string = '    '

[MISCELLANEOUS]
notes = FIXME,XXX,TODO

[SIMILARITIES]
min-similarity-lines = 4
ignore-comments = yes
ignore-docstrings = yes
ignore-imports = no

[TYPECHECK]
ignore-mixin-members = yes
ignored-classes = SQLObject
unsafe-load-any-extension = yes
generated-members = 
	REQUEST,
	acl_users,
	aq_parent,
	objects,
	DoesNotExist,
	can_read,
	can_write,
	get_url,
	size,
	content,
	status_code,
	create,
	build,
	fields,
	tag,
	org,
	course,
	category,
	name,
	revision,
	_meta,

[VARIABLES]
init-import = no
dummy-variables-rgx = _|dummy|unused|.*_unused
additional-builtins = 

[CLASSES]
defining-attr-methods = __init__,__new__,setUp
valid-classmethod-first-arg = cls
valid-metaclass-classmethod-first-arg = mcs

[DESIGN]
max-args = 5
ignored-argument-names = _.*
max-locals = 15
max-returns = 6
max-branches = 12
max-statements = 50
max-parents = 7
max-attributes = 7
min-public-methods = 2
max-public-methods = 20

[IMPORTS]
deprecated-modules = regsub,TERMIOS,Bastion,rexec
import-graph = 
ext-import-graph = 
int-import-graph = 

[EXCEPTIONS]
overgeneral-exceptions = Exception

# 2303568fe30e9fdd336b485a1a52e3b0aa0449b7