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

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

Comments

Loading...