sdadfadas

Форк
0
/
.pylintrc 
380 строк · 12.1 Кб
1
#
2
# Licensed to the Apache Software Foundation (ASF) under one or more
3
# contributor license agreements.  See the NOTICE file distributed with
4
# this work for additional information regarding copyright ownership.
5
# The ASF licenses this file to You under the Apache License, Version 2.0
6
# (the "License"); you may not use this file except in compliance with
7
# the License.  You may obtain a copy of the License at
8
#
9
#    http://www.apache.org/licenses/LICENSE-2.0
10
#
11
# Unless required by applicable law or agreed to in writing, software
12
# distributed under the License is distributed on an "AS IS" BASIS,
13
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
# See the License for the specific language governing permissions and
15
# limitations under the License.
16
#
17
[MASTER]
18

19
# Specify a configuration file.
20
#rcfile=
21

22
# Python code to execute, usually for sys.path manipulation such as
23
# pygtk.require().
24
#init-hook=
25

26
# Add files or directories to the blacklist. They should be base names, not
27
# paths.
28
ignore=CVS,migrations
29

30
# Add files or directories matching the regex patterns to the blacklist. The
31
# regex matches against base names, not paths.
32
ignore-patterns=
33

34
# Pickle collected data for later comparisons.
35
persistent=yes
36

37
# List of plugins (as comma separated values of python modules names) to load,
38
# usually to register additional checkers.
39
load-plugins=superset.extensions.pylint
40

41
# Use multiple processes to speed up Pylint.
42
jobs=2
43

44
# Allow loading of arbitrary C extensions. Extensions are imported into the
45
# active Python interpreter and may run arbitrary code.
46
unsafe-load-any-extension=no
47

48
# A comma-separated list of package or module names from where C extensions may
49
# be loaded. Extensions are loading into the active Python interpreter and may
50
# run arbitrary code
51
extension-pkg-whitelist=pyarrow
52

53

54
[MESSAGES CONTROL]
55

56
# Only show warnings with the listed confidence levels. Leave empty to show
57
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
58
confidence=
59

60
# Enable the message, report, category or checker with the given id(s). You can
61
# either give multiple identifier separated by comma (,) or put this option
62
# multiple time (only on the command line, not in the configuration file where
63
# it should appear only once). See also the "--disable" option for examples.
64
enable=
65
    useless-suppression,
66

67
# Disable the message, report, category or checker with the given id(s). You
68
# can either give multiple identifiers separated by comma (,) or put this
69
# option multiple times (only on the command line, not in the configuration
70
# file where it should appear only once).You can also use "--disable=all" to
71
# disable everything first and then reenable specific checks. For example, if
72
# you want to run only the similarities checker, you can use "--disable=all
73
# --enable=similarities". If you want to run only the classes checker, but have
74
# no Warning level messages displayed, use"--disable=all --enable=classes
75
# --disable=W"
76
disable=
77
    cyclic-import,  # re-enable once this no longer raises false positives
78
    missing-docstring,
79
    duplicate-code,
80
    line-too-long,
81
    unspecified-encoding,
82
    too-many-instance-attributes  # re-enable once this no longer raises false positives
83

84
[REPORTS]
85

86
# Set the output format. Available formats are text, parseable, colorized, msvs
87
# (visual studio) and html. You can also give a reporter class, eg
88
# mypackage.mymodule.MyReporterClass.
89
output-format=text
90

91
# Tells whether to display a full report or only the messages
92
reports=yes
93

94
# Python expression which should return a note less than 10 (10 is the highest
95
# note). You have access to the variables errors warning, statement which
96
# respectively contain the number of errors / warnings messages and the total
97
# number of statements analyzed. This is used by the global evaluation report
98
# (RP0004).
99
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
100

101
# Template used to display messages. This is a python new-style format string
102
# used to format the message information. See doc for all details
103
#msg-template=
104

105

106
[BASIC]
107

108
# Good variable names which should always be accepted, separated by a comma
109
good-names=_,df,ex,f,i,id,j,k,l,o,pk,Run,ts,v,x,y
110

111
# Bad variable names which should always be refused, separated by a comma
112
bad-names=bar,baz,db,fd,foo,sesh,session,tata,toto,tutu
113

114
# Colon-delimited sets of names that determine each other's naming style when
115
# the name regexes allow several styles.
116
name-group=
117

118
# Include a hint for the correct naming format with invalid-name
119
include-naming-hint=no
120

121
# List of decorators that produce properties, such as abc.abstractproperty. Add
122
# to this list to register other decorators that produce valid properties.
123
property-classes=
124
    abc.abstractproperty,
125
    sqlalchemy.ext.hybrid.hybrid_property
126

127
# Regular expression matching correct argument names
128
argument-rgx=[a-z_][a-z0-9_]{2,30}$
129

130
# Regular expression matching correct method names
131
method-rgx=[a-z_][a-z0-9_]{2,30}$
132

133
# Regular expression matching correct variable names
134
variable-rgx=[a-z_][a-z0-9_]{1,30}$
135

136
# Regular expression matching correct inline iteration names
137
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
138

139
# Regular expression matching correct constant names
140
const-rgx=(([A-Za-z_][A-Za-z0-9_]*)|(__.*__))$
141

142
# Regular expression matching correct class names
143
class-rgx=[A-Z_][a-zA-Z0-9]+$
144

145
# Regular expression matching correct class attribute names
146
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
147

148
# Regular expression matching correct module names
149
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
150

151
# Regular expression matching correct attribute names
152
attr-rgx=[a-z_][a-z0-9_]{2,30}$
153

154
# Regular expression matching correct function names
155
function-rgx=[a-z_][a-z0-9_]{2,30}$
156

157
# Regular expression which should only match function or class names that do
158
# not require a docstring.
159
no-docstring-rgx=^_
160

161
# Minimum line length for functions/classes that require docstrings, shorter
162
# ones are exempt.
163
docstring-min-length=10
164

165

166
[ELIF]
167

168
# Maximum number of nested blocks for function / method body
169
max-nested-blocks=5
170

171

172
[FORMAT]
173

174
# Maximum number of characters on a single line.
175
max-line-length=100
176

177
# Regexp for a line that is allowed to be longer than the limit.
178
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
179

180
# Allow the body of an if to be on the same line as the test if there is no
181
# else.
182
single-line-if-stmt=no
183

184
# Maximum number of lines in a module
185
max-module-lines=1000
186

187
# String used as indentation unit. This is usually "    " (4 spaces) or "\t" (1
188
# tab).
189
indent-string='    '
190

191
# Number of spaces of indent required inside a hanging  or continued line.
192
indent-after-paren=4
193

194
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
195
expected-line-ending-format=
196

197

198
[LOGGING]
199

200
# Logging modules to check that the string format arguments are in logging
201
# function parameter format
202
logging-modules=logging
203

204

205
[MISCELLANEOUS]
206

207
# List of note tags to take in consideration, separated by a comma.
208
notes=FIXME,XXX
209

210

211
[SIMILARITIES]
212

213
# Minimum lines number of a similarity.
214
min-similarity-lines=5
215

216
# Ignore comments when computing similarities.
217
ignore-comments=yes
218

219
# Ignore docstrings when computing similarities.
220
ignore-docstrings=yes
221

222
# Ignore imports when computing similarities.
223
ignore-imports=no
224

225

226
[SPELLING]
227

228
# Spelling dictionary name. Available dictionaries: none. To make it working
229
# install python-enchant package.
230
spelling-dict=
231

232
# List of comma separated words that should not be checked.
233
spelling-ignore-words=
234

235
# A path to a file that contains private dictionary; one word per line.
236
spelling-private-dict-file=
237

238
# Tells whether to store unknown words to indicated private dictionary in
239
# --spelling-private-dict-file option instead of raising a message.
240
spelling-store-unknown-words=no
241

242

243
[TYPECHECK]
244

245
# Tells whether missing members accessed in mixin class should be ignored. A
246
# mixin class is detected if its name ends with "mixin" (case insensitive).
247
ignore-mixin-members=yes
248

249
# List of module names for which member attributes should not be checked
250
# (useful for modules/projects where namespaces are manipulated during runtime
251
# and thus existing member attributes cannot be deduced by static analysis. It
252
# supports qualified module names, as well as Unix pattern matching.
253
ignored-modules=numpy,pandas,alembic.op,sqlalchemy,alembic.context,flask_appbuilder.security.sqla.PermissionView.role,flask_appbuilder.Model.metadata,flask_appbuilder.Base.metadata
254

255
# List of class names for which member attributes should not be checked (useful
256
# for classes with dynamically set attributes). This supports the use of
257
# qualified names.
258
ignored-classes=contextlib.closing,optparse.Values,thread._local,_thread._local
259

260
# List of members which are set dynamically and missed by pylint inference
261
# system, and so shouldn't trigger E1101 when accessed. Python regular
262
# expressions are accepted.
263
generated-members=
264

265
# List of decorators that produce context managers, such as
266
# contextlib.contextmanager. Add to this list to register other decorators that
267
# produce valid context managers.
268
contextmanager-decorators=contextlib.contextmanager
269

270

271
[VARIABLES]
272

273
# Tells whether we should check for unused import in __init__ files.
274
init-import=no
275

276
# A regular expression matching the name of dummy variables (i.e. expectedly
277
# not used).
278
dummy-variables-rgx=(_+[a-zA-Z0-9]*?$)|dummy
279

280
# List of additional names supposed to be defined in builtins. Remember that
281
# you should avoid to define new builtins when possible.
282
additional-builtins=
283

284
# List of strings which can identify a callback function by name. A callback
285
# name must start or end with one of those strings.
286
callbacks=cb_,_cb
287

288
# List of qualified module names which can have objects that can redefine
289
# builtins.
290
redefining-builtins-modules=six.moves,future.builtins
291

292

293
[CLASSES]
294

295
# List of method names used to declare (i.e. assign) instance attributes.
296
defining-attr-methods=__init__,__new__,setUp
297

298
# List of valid names for the first argument in a class method.
299
valid-classmethod-first-arg=cls
300

301
# List of valid names for the first argument in a metaclass class method.
302
valid-metaclass-classmethod-first-arg=mcs
303

304
# List of member names, which should be excluded from the protected access
305
# warning.
306
exclude-protected=_asdict,_fields,_replace,_source,_make
307

308

309
[DESIGN]
310

311
# Maximum number of arguments for function / method
312
max-args=5
313

314
# Argument names that match this expression will be ignored. Default to name
315
# with leading underscore
316
ignored-argument-names=_.*
317

318
# Maximum number of locals for function / method body
319
max-locals=15
320

321
# Maximum number of return / yield for function / method body
322
max-returns=10
323

324
# Maximum number of branch for function / method body
325
max-branches=15
326

327
# Maximum number of statements in function / method body
328
max-statements=50
329

330
# Maximum number of parents for a class (see R0901).
331
max-parents=7
332

333
# Maximum number of attributes for a class (see R0902).
334
max-attributes=8
335

336
# Minimum number of public methods for a class (see R0903).
337
min-public-methods=2
338

339
# Maximum number of public methods for a class (see R0904).
340
max-public-methods=20
341

342
# Maximum number of boolean expressions in a if statement
343
max-bool-expr=5
344

345

346
[IMPORTS]
347

348
# Deprecated modules which should not be used, separated by a comma
349
deprecated-modules=optparse
350

351
# Create a graph of every (i.e. internal and external) dependencies in the
352
# given file (report RP0402 must not be disabled)
353
import-graph=
354

355
# Create a graph of external dependencies in the given file (report RP0402 must
356
# not be disabled)
357
ext-import-graph=
358

359
# Create a graph of internal dependencies in the given file (report RP0402 must
360
# not be disabled)
361
int-import-graph=
362

363
# Force import order to recognize a module as part of the standard
364
# compatibility libraries.
365
known-standard-library=
366

367
# Force import order to recognize a module as part of a third party library.
368
known-third-party=enchant
369

370
# Analyse import fallback blocks. This can be used to support both Python 2 and
371
# 3 compatible code, which means that the block might have code that exists
372
# only in one or another interpreter, leading to false positives when analysed.
373
analyse-fallback-blocks=no
374

375

376
[EXCEPTIONS]
377

378
# Exceptions that will emit a warning when being caught. Defaults to
379
# "Exception"
380
overgeneral-exceptions=builtins.Exception
381

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.