Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

.pylintrc 18 KB

You have to be logged in to leave a comment. Sign In
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
56
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
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
  1. [MASTER]
  2. # generated with:
  3. #
  4. # python -m pylint --good-names=i,j,k,n,s,d,ex,Run,_,pk,x,y --max-line-length=140
  5. # --disable=len-as-condition,fixme,too-many-arguments,C0330 --max-locals=20 --ignore-imports=yes
  6. # --generate-rcfile > .pylintrc
  7. # A comma-separated list of package or module names from where C extensions may
  8. # be loaded. Extensions are loading into the active Python interpreter and may
  9. # run arbitrary code.
  10. extension-pkg-whitelist=lxml,numpy
  11. # Add files or directories to the blacklist. They should be base names, not
  12. # paths.
  13. ignore=CVS
  14. # Add files or directories matching the regex patterns to the blacklist. The
  15. # regex matches against base names, not paths.
  16. ignore-patterns=
  17. # Python code to execute, usually for sys.path manipulation such as
  18. # pygtk.require().
  19. #init-hook=
  20. # Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
  21. # number of processors available to use.
  22. jobs=1
  23. # Control the amount of potential inferred values when inferring a single
  24. # object. This can help the performance when dealing with large functions or
  25. # complex, nested conditions.
  26. limit-inference-results=100
  27. # List of plugins (as comma separated values of python module names) to load,
  28. # usually to register additional checkers.
  29. load-plugins=
  30. # Pickle collected data for later comparisons.
  31. persistent=yes
  32. # Specify a configuration file.
  33. #rcfile=
  34. # When enabled, pylint would attempt to guess common misconfiguration and emit
  35. # user-friendly hints instead of false-positive error messages.
  36. suggestion-mode=yes
  37. # Allow loading of arbitrary C extensions. Extensions are imported into the
  38. # active Python interpreter and may run arbitrary code.
  39. unsafe-load-any-extension=no
  40. [MESSAGES CONTROL]
  41. # Only show warnings with the listed confidence levels. Leave empty to show
  42. # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
  43. confidence=
  44. # Disable the message, report, category or checker with the given id(s). You
  45. # can either give multiple identifiers separated by comma (,) or put this
  46. # option multiple times (only on the command line, not in the configuration
  47. # file where it should appear only once). You can also use "--disable=all" to
  48. # disable everything first and then reenable specific checks. For example, if
  49. # you want to run only the similarities checker, you can use "--disable=all
  50. # --enable=similarities". If you want to run only the classes checker, but have
  51. # no Warning level messages displayed, use "--disable=all --enable=classes
  52. # --disable=W".
  53. disable=bad-continuation,
  54. len-as-condition,
  55. print-statement,
  56. parameter-unpacking,
  57. unpacking-in-except,
  58. old-raise-syntax,
  59. backtick,
  60. long-suffix,
  61. old-ne-operator,
  62. old-octal-literal,
  63. import-star-module-level,
  64. non-ascii-bytes-literal,
  65. raw-checker-failed,
  66. bad-inline-option,
  67. locally-disabled,
  68. file-ignored,
  69. suppressed-message,
  70. useless-suppression,
  71. deprecated-pragma,
  72. use-symbolic-message-instead,
  73. too-many-arguments,
  74. fixme,
  75. apply-builtin,
  76. basestring-builtin,
  77. buffer-builtin,
  78. cmp-builtin,
  79. coerce-builtin,
  80. execfile-builtin,
  81. file-builtin,
  82. long-builtin,
  83. raw_input-builtin,
  84. reduce-builtin,
  85. standarderror-builtin,
  86. unicode-builtin,
  87. xrange-builtin,
  88. coerce-method,
  89. delslice-method,
  90. getslice-method,
  91. setslice-method,
  92. no-absolute-import,
  93. old-division,
  94. dict-iter-method,
  95. dict-view-method,
  96. next-method-called,
  97. metaclass-assignment,
  98. indexing-exception,
  99. raising-string,
  100. reload-builtin,
  101. oct-method,
  102. hex-method,
  103. nonzero-method,
  104. cmp-method,
  105. input-builtin,
  106. round-builtin,
  107. intern-builtin,
  108. unichr-builtin,
  109. map-builtin-not-iterating,
  110. zip-builtin-not-iterating,
  111. range-builtin-not-iterating,
  112. filter-builtin-not-iterating,
  113. using-cmp-argument,
  114. eq-without-hash,
  115. div-method,
  116. idiv-method,
  117. rdiv-method,
  118. exception-message-attribute,
  119. invalid-str-codec,
  120. sys-max-int,
  121. bad-python3-import,
  122. deprecated-string-function,
  123. deprecated-str-translate-call,
  124. deprecated-itertools-function,
  125. deprecated-types-field,
  126. next-method-defined,
  127. dict-items-not-iterating,
  128. dict-keys-not-iterating,
  129. dict-values-not-iterating,
  130. deprecated-operator-function,
  131. deprecated-urllib-function,
  132. xreadlines-attribute,
  133. deprecated-sys-function,
  134. exception-escape,
  135. comprehension-escape
  136. # Enable the message, report, category or checker with the given id(s). You can
  137. # either give multiple identifier separated by comma (,) or put this option
  138. # multiple time (only on the command line, not in the configuration file where
  139. # it should appear only once). See also the "--disable" option for examples.
  140. enable=c-extension-no-member
  141. [REPORTS]
  142. # Python expression which should return a score less than or equal to 10. You
  143. # have access to the variables 'error', 'warning', 'refactor', and 'convention'
  144. # which contain the number of messages in each category, as well as 'statement'
  145. # which is the total number of statements analyzed. This score is used by the
  146. # global evaluation report (RP0004).
  147. evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
  148. # Template used to display messages. This is a python new-style format string
  149. # used to format the message information. See doc for all details.
  150. #msg-template=
  151. # Set the output format. Available formats are text, parseable, colorized, json
  152. # and msvs (visual studio). You can also give a reporter class, e.g.
  153. # mypackage.mymodule.MyReporterClass.
  154. output-format=text
  155. # Tells whether to display a full report or only the messages.
  156. reports=no
  157. # Activate the evaluation score.
  158. score=yes
  159. [REFACTORING]
  160. # Maximum number of nested blocks for function / method body
  161. max-nested-blocks=5
  162. # Complete name of functions that never returns. When checking for
  163. # inconsistent-return-statements if a never returning function is called then
  164. # it will be considered as an explicit return statement and no message will be
  165. # printed.
  166. never-returning-functions=sys.exit
  167. [BASIC]
  168. # Naming style matching correct argument names.
  169. argument-naming-style=snake_case
  170. # Regular expression matching correct argument names. Overrides argument-
  171. # naming-style.
  172. #argument-rgx=
  173. # Naming style matching correct attribute names.
  174. attr-naming-style=snake_case
  175. # Regular expression matching correct attribute names. Overrides attr-naming-
  176. # style.
  177. #attr-rgx=
  178. # Bad variable names which should always be refused, separated by a comma.
  179. bad-names=foo,
  180. bar,
  181. baz,
  182. toto,
  183. tutu,
  184. tata
  185. # Naming style matching correct class attribute names.
  186. class-attribute-naming-style=any
  187. # Regular expression matching correct class attribute names. Overrides class-
  188. # attribute-naming-style.
  189. #class-attribute-rgx=
  190. # Naming style matching correct class names.
  191. class-naming-style=PascalCase
  192. # Regular expression matching correct class names. Overrides class-naming-
  193. # style.
  194. #class-rgx=
  195. # Naming style matching correct constant names.
  196. const-naming-style=UPPER_CASE
  197. # Regular expression matching correct constant names. Overrides const-naming-
  198. # style.
  199. #const-rgx=
  200. # Minimum line length for functions/classes that require docstrings, shorter
  201. # ones are exempt.
  202. docstring-min-length=-1
  203. # Naming style matching correct function names.
  204. function-naming-style=snake_case
  205. # Regular expression matching correct function names. Overrides function-
  206. # naming-style.
  207. #function-rgx=
  208. # Good variable names which should always be accepted, separated by a comma.
  209. good-names=i,
  210. j,
  211. k,
  212. n,
  213. s,
  214. d,
  215. ex,
  216. Run,
  217. _,
  218. pk,
  219. x,
  220. y
  221. # Include a hint for the correct naming format with invalid-name.
  222. include-naming-hint=no
  223. # Naming style matching correct inline iteration names.
  224. inlinevar-naming-style=any
  225. # Regular expression matching correct inline iteration names. Overrides
  226. # inlinevar-naming-style.
  227. #inlinevar-rgx=
  228. # Naming style matching correct method names.
  229. method-naming-style=snake_case
  230. # Regular expression matching correct method names. Overrides method-naming-
  231. # style.
  232. #method-rgx=
  233. # Naming style matching correct module names.
  234. module-naming-style=snake_case
  235. # Regular expression matching correct module names. Overrides module-naming-
  236. # style.
  237. #module-rgx=
  238. # Colon-delimited sets of names that determine each other's naming style when
  239. # the name regexes allow several styles.
  240. name-group=
  241. # Regular expression which should only match function or class names that do
  242. # not require a docstring.
  243. no-docstring-rgx=^_
  244. # List of decorators that produce properties, such as abc.abstractproperty. Add
  245. # to this list to register other decorators that produce valid properties.
  246. # These decorators are taken in consideration only for invalid-name.
  247. property-classes=abc.abstractproperty
  248. # Naming style matching correct variable names.
  249. variable-naming-style=snake_case
  250. # Regular expression matching correct variable names. Overrides variable-
  251. # naming-style.
  252. #variable-rgx=
  253. [FORMAT]
  254. # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
  255. expected-line-ending-format=
  256. # Regexp for a line that is allowed to be longer than the limit.
  257. ignore-long-lines=^\s*(# )?<?https?://\S+>?$
  258. # Number of spaces of indent required inside a hanging or continued line.
  259. indent-after-paren=4
  260. # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
  261. # tab).
  262. indent-string=' '
  263. # Maximum number of characters on a single line.
  264. max-line-length=140
  265. # Maximum number of lines in a module.
  266. max-module-lines=1000
  267. # List of optional constructs for which whitespace checking is disabled. `dict-
  268. # separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
  269. # `trailing-comma` allows a space between comma and closing bracket: (a, ).
  270. # `empty-line` allows space-only lines.
  271. no-space-check=trailing-comma,
  272. dict-separator
  273. # Allow the body of a class to be on the same line as the declaration if body
  274. # contains single statement.
  275. single-line-class-stmt=no
  276. # Allow the body of an if to be on the same line as the test if there is no
  277. # else.
  278. single-line-if-stmt=no
  279. [LOGGING]
  280. # Format style used to check logging format string. `old` means using %
  281. # formatting, `new` is for `{}` formatting,and `fstr` is for f-strings.
  282. logging-format-style=old
  283. # Logging modules to check that the string format arguments are in logging
  284. # function parameter format.
  285. logging-modules=logging
  286. [MISCELLANEOUS]
  287. # List of note tags to take in consideration, separated by a comma.
  288. notes=FIXME,
  289. XXX,
  290. TODO
  291. [SIMILARITIES]
  292. # Ignore comments when computing similarities.
  293. ignore-comments=yes
  294. # Ignore docstrings when computing similarities.
  295. ignore-docstrings=yes
  296. # Ignore imports when computing similarities.
  297. ignore-imports=yes
  298. # Minimum lines number of a similarity.
  299. # need to change to 5 due to false positive of click arguments
  300. # and it cannot be disabled within file: https://github.com/PyCQA/pylint/issues/214
  301. min-similarity-lines=5
  302. [SPELLING]
  303. # Limits count of emitted suggestions for spelling mistakes.
  304. max-spelling-suggestions=4
  305. # Spelling dictionary name. Available dictionaries: none. To make it work,
  306. # install the python-enchant package.
  307. spelling-dict=
  308. # List of comma separated words that should not be checked.
  309. spelling-ignore-words=
  310. # A path to a file that contains the private dictionary; one word per line.
  311. spelling-private-dict-file=
  312. # Tells whether to store unknown words to the private dictionary (see the
  313. # --spelling-private-dict-file option) instead of raising a message.
  314. spelling-store-unknown-words=no
  315. [STRING]
  316. # This flag controls whether the implicit-str-concat-in-sequence should
  317. # generate a warning on implicit string concatenation in sequences defined over
  318. # several lines.
  319. check-str-concat-over-line-jumps=no
  320. [TYPECHECK]
  321. # List of decorators that produce context managers, such as
  322. # contextlib.contextmanager. Add to this list to register other decorators that
  323. # produce valid context managers.
  324. contextmanager-decorators=contextlib.contextmanager
  325. # List of members which are set dynamically and missed by pylint inference
  326. # system, and so shouldn't trigger E1101 when accessed. Python regular
  327. # expressions are accepted.
  328. generated-members=numpy.*
  329. # Tells whether missing members accessed in mixin class should be ignored. A
  330. # mixin class is detected if its name ends with "mixin" (case insensitive).
  331. ignore-mixin-members=yes
  332. # Tells whether to warn about missing members when the owner of the attribute
  333. # is inferred to be None.
  334. ignore-none=yes
  335. # This flag controls whether pylint should warn about no-member and similar
  336. # checks whenever an opaque object is returned when inferring. The inference
  337. # can return multiple potential results while evaluating a Python object, but
  338. # some branches might not be evaluated, which results in partial inference. In
  339. # that case, it might be useful to still emit no-member and other checks for
  340. # the rest of the inferred objects.
  341. ignore-on-opaque-inference=yes
  342. # List of class names for which member attributes should not be checked (useful
  343. # for classes with dynamically set attributes). This supports the use of
  344. # qualified names.
  345. ignored-classes=optparse.Values,thread._local,_thread._local
  346. # List of module names for which member attributes should not be checked
  347. # (useful for modules/projects where namespaces are manipulated during runtime
  348. # and thus existing member attributes cannot be deduced by static analysis). It
  349. # supports qualified module names, as well as Unix pattern matching.
  350. ignored-modules=
  351. # Show a hint with possible names when a member name was not found. The aspect
  352. # of finding the hint is based on edit distance.
  353. missing-member-hint=yes
  354. # The minimum edit distance a name should have in order to be considered a
  355. # similar match for a missing member name.
  356. missing-member-hint-distance=1
  357. # The total number of similar names that should be taken in consideration when
  358. # showing a hint for a missing member.
  359. missing-member-max-choices=1
  360. # List of decorators that change the signature of a decorated function.
  361. signature-mutators=
  362. [VARIABLES]
  363. # List of additional names supposed to be defined in builtins. Remember that
  364. # you should avoid defining new builtins when possible.
  365. additional-builtins=
  366. # Tells whether unused global variables should be treated as a violation.
  367. allow-global-unused-variables=yes
  368. # List of strings which can identify a callback function by name. A callback
  369. # name must start or end with one of those strings.
  370. callbacks=cb_,
  371. _cb
  372. # A regular expression matching the name of dummy variables (i.e. expected to
  373. # not be used).
  374. dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
  375. # Argument names that match this expression will be ignored. Default to name
  376. # with leading underscore.
  377. ignored-argument-names=_.*|^ignored_|^unused_
  378. # Tells whether we should check for unused import in __init__ files.
  379. init-import=no
  380. # List of qualified module names which can have objects that can redefine
  381. # builtins.
  382. redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
  383. [CLASSES]
  384. # List of method names used to declare (i.e. assign) instance attributes.
  385. defining-attr-methods=__init__,
  386. __new__,
  387. setUp,
  388. __post_init__
  389. # List of member names, which should be excluded from the protected access
  390. # warning.
  391. exclude-protected=_asdict,
  392. _fields,
  393. _replace,
  394. _source,
  395. _make
  396. # List of valid names for the first argument in a class method.
  397. valid-classmethod-first-arg=cls
  398. # List of valid names for the first argument in a metaclass class method.
  399. valid-metaclass-classmethod-first-arg=cls
  400. [DESIGN]
  401. # Maximum number of arguments for function / method.
  402. max-args=5
  403. # Maximum number of attributes for a class (see R0902).
  404. max-attributes=7
  405. # Maximum number of boolean expressions in an if statement (see R0916).
  406. max-bool-expr=5
  407. # Maximum number of branch for function / method body.
  408. max-branches=12
  409. # Maximum number of locals for function / method body.
  410. max-locals=20
  411. # Maximum number of parents for a class (see R0901).
  412. max-parents=7
  413. # Maximum number of public methods for a class (see R0904).
  414. max-public-methods=20
  415. # Maximum number of return / yield for function / method body.
  416. max-returns=6
  417. # Maximum number of statements in function / method body.
  418. max-statements=50
  419. # Minimum number of public methods for a class (see R0903).
  420. min-public-methods=2
  421. [IMPORTS]
  422. # List of modules that can be imported at any level, not just the top level
  423. # one.
  424. allow-any-import-level=
  425. # Allow wildcard imports from modules that define __all__.
  426. allow-wildcard-with-all=no
  427. # Analyse import fallback blocks. This can be used to support both Python 2 and
  428. # 3 compatible code, which means that the block might have code that exists
  429. # only in one or another interpreter, leading to false positives when analysed.
  430. analyse-fallback-blocks=no
  431. # Deprecated modules which should not be used, separated by a comma.
  432. deprecated-modules=optparse,tkinter.tix
  433. # Create a graph of external dependencies in the given file (report RP0402 must
  434. # not be disabled).
  435. ext-import-graph=
  436. # Create a graph of every (i.e. internal and external) dependencies in the
  437. # given file (report RP0402 must not be disabled).
  438. import-graph=
  439. # Create a graph of internal dependencies in the given file (report RP0402 must
  440. # not be disabled).
  441. int-import-graph=
  442. # Force import order to recognize a module as part of the standard
  443. # compatibility libraries.
  444. known-standard-library=
  445. # Force import order to recognize a module as part of a third party library.
  446. known-third-party=enchant
  447. # Couples of modules and preferred modules, separated by a comma.
  448. preferred-modules=
  449. [EXCEPTIONS]
  450. # Exceptions that will emit a warning when being caught. Defaults to
  451. # "BaseException, Exception".
  452. overgeneral-exceptions=BaseException,
  453. Exception
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...