pylintrc 4.12 KB
Newer Older
1 2 3 4
# ***************************
# ** DO NOT EDIT THIS FILE **
# ***************************
#
5
# This file was generated by edx-lint: http://github.com/edx.edx-lint
6
#
7 8 9
# 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.
10
#
11
# LOCAL CHANGE:
12
#
13 14
# 1. Edit the local pylintrc_tweaks file to add changes just to this
#    repo's file.
15
#
16
# 2. Run:
17
#
18
#       $ edx_lint write pylintrc
19
#
20 21
# 3. This will modify the local file.  Submit a pull request to get it
#    checked in so that others will benefit.
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
# 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!
47 48 49 50 51 52 53 54
#
#
#
#
#
# SERIOUSLY.
#
# ------------------------------
55
[MASTER]
56
ignore = ,.git,migrations,node_modules,.pycharm_helpers
57
persistent = yes
58
load-plugins = edx_lint.pylint,pylint_django,pylint_celery
59 60

[MESSAGES CONTROL]
61 62
disable = 
	locally-disabled,
63
	locally-enabled,
64 65 66 67 68 69 70
	too-few-public-methods,
	bad-builtin,
	star-args,
	abstract-class-not-used,
	abstract-class-little-used,
	no-init,
	fixme,
71
	logging-format-interpolation,
72 73 74 75 76 77 78 79 80 81
	too-many-lines,
	no-self-use,
	too-many-ancestors,
	too-many-instance-attributes,
	too-few-public-methods,
	too-many-public-methods,
	too-many-return-statements,
	too-many-branches,
	too-many-arguments,
	too-many-locals,
82
	unused-wildcard-import,
83
	duplicate-code
84 85

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

[BASIC]
92 93 94 95
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]+$
96
function-rgx = ([a-z_][a-z0-9_]{2,40}|test_[a-z0-9_]+)$
97
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_]+)$
Robert Raposa committed
98 99 100 101
attr-rgx = [a-z_][a-z0-9_]{2,40}$
argument-rgx = [a-z_][a-z0-9_]{2,40}$
variable-rgx = [a-z_][a-z0-9_]{2,40}$
class-attribute-rgx = ([A-Za-z_][A-Za-z0-9_]{2,40}|(__.*__))$
102 103 104
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
105
no-docstring-rgx = __.*__$|test_.+|setUp$|setUpClass$|tearDown$|tearDownClass$|Meta$
106
docstring-min-length = -1
107 108

[FORMAT]
109 110 111 112 113 114
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 = '    '
115

David Baumgold committed
116
[MISCELLANEOUS]
117
notes = FIXME,XXX,TODO
David Baumgold committed
118

119
[SIMILARITIES]
120 121 122 123
min-similarity-lines = 4
ignore-comments = yes
ignore-docstrings = yes
ignore-imports = no
David Baumgold committed
124 125

[TYPECHECK]
126 127
ignore-mixin-members = yes
ignored-classes = SQLObject
128
unsafe-load-any-extension = yes
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
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,
151 152

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

David Baumgold committed
157
[CLASSES]
158 159 160
defining-attr-methods = __init__,__new__,setUp
valid-classmethod-first-arg = cls
valid-metaclass-classmethod-first-arg = mcs
161 162

[DESIGN]
163 164 165 166 167 168 169 170 171 172
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
173

David Baumgold committed
174
[IMPORTS]
175 176 177 178
deprecated-modules = regsub,TERMIOS,Bastion,rexec
import-graph = 
ext-import-graph = 
int-import-graph = 
179 180

[EXCEPTIONS]
181
overgeneral-exceptions = Exception
182

183
# 42ec1461de97fc01d7191c1c5f2fd5ec67671a61