.pylintrc 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  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=scipy,cereal.messaging.messaging_pyx,PyQt5,av
  6. # Add files or directories to the blacklist. They should be base names, not
  7. # paths.
  8. ignore=CVS
  9. # Add files or directories matching the regex patterns to the blacklist. The
  10. # regex matches against base names, not paths.
  11. ignore-patterns=.*node_service_pb2.*
  12. # Python code to execute, usually for sys.path manipulation such as
  13. # pygtk.require().
  14. #init-hook=
  15. # Use multiple processes to speed up Pylint.
  16. jobs=4
  17. # List of plugins (as comma separated values of python modules names) to load,
  18. # usually to register additional checkers.
  19. load-plugins=
  20. # Pickle collected data for later comparisons.
  21. persistent=yes
  22. # Specify a configuration file.
  23. #rcfile=
  24. # When enabled, pylint would attempt to guess common misconfiguration and emit
  25. # user-friendly hints instead of false-positive error messages
  26. suggestion-mode=yes
  27. # Allow loading of arbitrary C extensions. Extensions are imported into the
  28. # active Python interpreter and may run arbitrary code.
  29. unsafe-load-any-extension=no
  30. [MESSAGES CONTROL]
  31. # Only show warnings with the listed confidence levels. Leave empty to show
  32. # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
  33. confidence=
  34. # Disable the message, report, category or checker with the given id(s). You
  35. # can either give multiple identifiers separated by comma (,) or put this
  36. # option multiple times (only on the command line, not in the configuration
  37. # file where it should appear only once).You can also use "--disable=all" to
  38. # disable everything first and then reenable specific checks. For example, if
  39. # you want to run only the similarities checker, you can use "--disable=all
  40. # --enable=similarities". If you want to run only the classes checker, but have
  41. # no Warning level messages displayed, use"--disable=all --enable=classes
  42. # --disable=W"
  43. disable=C,R,W0613,W0511,W0212,W0201,W0106,W0603,W0621,W0703,W1201,W1203,E1136,W1514,E1101,W0221,W0105,E0401
  44. # E1101 for function binding
  45. # W0221 for Function class
  46. # W0105 for comment strings
  47. # E0401 for missing imports
  48. # Enable the message, report, category or checker with the given id(s). You can
  49. # either give multiple identifier separated by comma (,) or put this option
  50. # multiple time (only on the command line, not in the configuration file where
  51. # it should appear only once). See also the "--disable" option for examples.
  52. enable=c-extension-no-member,use-a-generator, no-else-return
  53. [REPORTS]
  54. # Python expression which should return a note less than 10 (10 is the highest
  55. # note). You have access to the variables errors warning, statement which
  56. # respectively contain the number of errors / warnings messages and the total
  57. # number of statements analyzed. This is used by the global evaluation report
  58. # (RP0004).
  59. evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
  60. # Template used to display messages. This is a python new-style format string
  61. # used to format the message information. See doc for all details
  62. #msg-template=
  63. # Set the output format. Available formats are text, parseable, colorized, json
  64. # and msvs (visual studio).You can also give a reporter class, eg
  65. # mypackage.mymodule.MyReporterClass.
  66. output-format=text
  67. # Tells whether to display a full report or only the messages
  68. reports=no
  69. # Activate the evaluation score.
  70. score=yes
  71. [REFACTORING]
  72. # Maximum number of nested blocks for function / method body
  73. max-nested-blocks=5
  74. # Complete name of functions that never returns. When checking for
  75. # inconsistent-return-statements if a never returning function is called then
  76. # it will be considered as an explicit return statement and no message will be
  77. # printed.
  78. never-returning-functions=optparse.Values,sys.exit
  79. [LOGGING]
  80. # Logging modules to check that the string format arguments are in logging
  81. # function parameter format
  82. logging-modules=logging
  83. [SPELLING]
  84. # Limits count of emitted suggestions for spelling mistakes
  85. max-spelling-suggestions=4
  86. # Spelling dictionary name. Available dictionaries: none. To make it working
  87. # install python-enchant package.
  88. spelling-dict=
  89. # List of comma separated words that should not be checked.
  90. spelling-ignore-words=
  91. # A path to a file that contains private dictionary; one word per line.
  92. spelling-private-dict-file=
  93. # Tells whether to store unknown words to indicated private dictionary in
  94. # --spelling-private-dict-file option instead of raising a message.
  95. spelling-store-unknown-words=no
  96. [MISCELLANEOUS]
  97. # List of note tags to take in consideration, separated by a comma.
  98. notes=FIXME,
  99. XXX,
  100. TODO
  101. [SIMILARITIES]
  102. # Ignore comments when computing similarities.
  103. ignore-comments=yes
  104. # Ignore docstrings when computing similarities.
  105. ignore-docstrings=yes
  106. # Ignore imports when computing similarities.
  107. ignore-imports=no
  108. # Minimum lines number of a similarity.
  109. min-similarity-lines=4
  110. [TYPECHECK]
  111. # List of decorators that produce context managers, such as
  112. # contextlib.contextmanager. Add to this list to register other decorators that
  113. # produce valid context managers.
  114. contextmanager-decorators=contextlib.contextmanager
  115. # List of members which are set dynamically and missed by pylint inference
  116. # system, and so shouldn't trigger E1101 when accessed. Python regular
  117. # expressions are accepted.
  118. generated-members=capnp.* cereal.* pygame.* zmq.* setproctitle.* smbus2.* usb1.* serial.* cv2.* ft4222.* carla.*
  119. # Tells whether missing members accessed in mixin class should be ignored. A
  120. # mixin class is detected if its name ends with "mixin" (case insensitive).
  121. ignore-mixin-members=yes
  122. # This flag controls whether pylint should warn about no-member and similar
  123. # checks whenever an opaque object is returned when inferring. The inference
  124. # can return multiple potential results while evaluating a Python object, but
  125. # some branches might not be evaluated, which results in partial inference. In
  126. # that case, it might be useful to still emit no-member and other checks for
  127. # the rest of the inferred objects.
  128. ignore-on-opaque-inference=yes
  129. # List of class names for which member attributes should not be checked (useful
  130. # for classes with dynamically set attributes). This supports the use of
  131. # qualified names.
  132. ignored-classes=optparse.Values,thread._local,_thread._local
  133. # List of module names for which member attributes should not be checked
  134. # (useful for modules/projects where namespaces are manipulated during runtime
  135. # and thus existing member attributes cannot be deduced by static analysis. It
  136. # supports qualified module names, as well as Unix pattern matching.
  137. ignored-modules=flask setproctitle usb1 flask.ext.socketio smbus2 usb1.*
  138. # Show a hint with possible names when a member name was not found. The aspect
  139. # of finding the hint is based on edit distance.
  140. missing-member-hint=yes
  141. # The minimum edit distance a name should have in order to be considered a
  142. # similar match for a missing member name.
  143. missing-member-hint-distance=1
  144. # The total number of similar names that should be taken in consideration when
  145. # showing a hint for a missing member.
  146. missing-member-max-choices=1
  147. [VARIABLES]
  148. # List of additional names supposed to be defined in builtins. Remember that
  149. # you should avoid to define new builtins when possible.
  150. additional-builtins=
  151. # Tells whether unused global variables should be treated as a violation.
  152. allow-global-unused-variables=yes
  153. # List of strings which can identify a callback function by name. A callback
  154. # name must start or end with one of those strings.
  155. callbacks=cb_,
  156. _cb
  157. # A regular expression matching the name of dummy variables (i.e. expectedly
  158. # not used).
  159. dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
  160. # Argument names that match this expression will be ignored. Default to name
  161. # with leading underscore
  162. ignored-argument-names=_.*|^ignored_|^unused_
  163. # Tells whether we should check for unused import in __init__ files.
  164. init-import=no
  165. # List of qualified module names which can have objects that can redefine
  166. # builtins.
  167. redefining-builtins-modules=six.moves,past.builtins,future.builtins
  168. [FORMAT]
  169. # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
  170. expected-line-ending-format=
  171. # Regexp for a line that is allowed to be longer than the limit.
  172. ignore-long-lines=^\s*(# )?<?https?://\S+>?$
  173. # Number of spaces of indent required inside a hanging or continued line.
  174. indent-after-paren=4
  175. # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
  176. # tab).
  177. indent-string=' '
  178. # Maximum number of characters on a single line.
  179. max-line-length=150
  180. # Maximum number of lines in a module
  181. max-module-lines=1000
  182. # Allow the body of a class to be on the same line as the declaration if body
  183. # contains single statement.
  184. single-line-class-stmt=no
  185. # Allow the body of an if to be on the same line as the test if there is no
  186. # else.
  187. single-line-if-stmt=no
  188. [BASIC]
  189. # Naming style matching correct argument names
  190. argument-naming-style=snake_case
  191. # Regular expression matching correct argument names. Overrides argument-
  192. # naming-style
  193. #argument-rgx=
  194. # Naming style matching correct attribute names
  195. attr-naming-style=snake_case
  196. # Regular expression matching correct attribute names. Overrides attr-naming-
  197. # style
  198. #attr-rgx=
  199. # Bad variable names which should always be refused, separated by a comma
  200. bad-names=foo,
  201. bar,
  202. baz,
  203. toto,
  204. tutu,
  205. tata
  206. # Naming style matching correct class attribute names
  207. class-attribute-naming-style=any
  208. # Regular expression matching correct class attribute names. Overrides class-
  209. # attribute-naming-style
  210. #class-attribute-rgx=
  211. # Naming style matching correct class names
  212. class-naming-style=PascalCase
  213. # Regular expression matching correct class names. Overrides class-naming-style
  214. #class-rgx=
  215. # Naming style matching correct constant names
  216. const-naming-style=UPPER_CASE
  217. # Regular expression matching correct constant names. Overrides const-naming-
  218. # style
  219. #const-rgx=
  220. # Minimum line length for functions/classes that require docstrings, shorter
  221. # ones are exempt.
  222. docstring-min-length=-1
  223. # Naming style matching correct function names
  224. function-naming-style=snake_case
  225. # Regular expression matching correct function names. Overrides function-
  226. # naming-style
  227. #function-rgx=
  228. # Good variable names which should always be accepted, separated by a comma
  229. good-names=i,
  230. j,
  231. k,
  232. ex,
  233. Run,
  234. _
  235. # Include a hint for the correct naming format with invalid-name
  236. include-naming-hint=no
  237. # Naming style matching correct inline iteration names
  238. inlinevar-naming-style=any
  239. # Regular expression matching correct inline iteration names. Overrides
  240. # inlinevar-naming-style
  241. #inlinevar-rgx=
  242. # Naming style matching correct method names
  243. method-naming-style=snake_case
  244. # Regular expression matching correct method names. Overrides method-naming-
  245. # style
  246. #method-rgx=
  247. # Naming style matching correct module names
  248. module-naming-style=snake_case
  249. # Regular expression matching correct module names. Overrides module-naming-
  250. # style
  251. #module-rgx=
  252. # Colon-delimited sets of names that determine each other's naming style when
  253. # the name regexes allow several styles.
  254. name-group=
  255. # Regular expression which should only match function or class names that do
  256. # not require a docstring.
  257. no-docstring-rgx=^_
  258. # List of decorators that produce properties, such as abc.abstractproperty. Add
  259. # to this list to register other decorators that produce valid properties.
  260. property-classes=abc.abstractproperty
  261. # Naming style matching correct variable names
  262. variable-naming-style=snake_case
  263. # Regular expression matching correct variable names. Overrides variable-
  264. # naming-style
  265. #variable-rgx=
  266. [DESIGN]
  267. # Maximum number of arguments for function / method
  268. max-args=5
  269. # Maximum number of attributes for a class (see R0902).
  270. max-attributes=7
  271. # Maximum number of boolean expressions in a if statement
  272. max-bool-expr=5
  273. # Maximum number of branch for function / method body
  274. max-branches=12
  275. # Maximum number of locals for function / method body
  276. max-locals=15
  277. # Maximum number of parents for a class (see R0901).
  278. max-parents=7
  279. # Maximum number of public methods for a class (see R0904).
  280. max-public-methods=20
  281. # Maximum number of return / yield for function / method body
  282. max-returns=6
  283. # Maximum number of statements in function / method body
  284. max-statements=50
  285. # Minimum number of public methods for a class (see R0903).
  286. min-public-methods=2
  287. [CLASSES]
  288. # List of method names used to declare (i.e. assign) instance attributes.
  289. defining-attr-methods=__init__,
  290. __new__,
  291. setUp
  292. # List of member names, which should be excluded from the protected access
  293. # warning.
  294. exclude-protected=_asdict,
  295. _fields,
  296. _replace,
  297. _source,
  298. _make
  299. # List of valid names for the first argument in a class method.
  300. valid-classmethod-first-arg=cls
  301. # List of valid names for the first argument in a metaclass class method.
  302. valid-metaclass-classmethod-first-arg=mcs
  303. [IMPORTS]
  304. # Allow wildcard imports from modules that define __all__.
  305. allow-wildcard-with-all=no
  306. # Analyse import fallback blocks. This can be used to support both Python 2 and
  307. # 3 compatible code, which means that the block might have code that exists
  308. # only in one or another interpreter, leading to false positives when analysed.
  309. analyse-fallback-blocks=no
  310. # Deprecated modules which should not be used, separated by a comma
  311. deprecated-modules=regsub,
  312. TERMIOS,
  313. Bastion,
  314. rexec
  315. # Create a graph of external dependencies in the given file (report RP0402 must
  316. # not be disabled)
  317. ext-import-graph=
  318. # Create a graph of every (i.e. internal and external) dependencies in the
  319. # given file (report RP0402 must not be disabled)
  320. import-graph=
  321. # Create a graph of internal dependencies in the given file (report RP0402 must
  322. # not be disabled)
  323. int-import-graph=
  324. # Force import order to recognize a module as part of the standard
  325. # compatibility libraries.
  326. known-standard-library=
  327. # Force import order to recognize a module as part of a third party library.
  328. known-third-party=enchant
  329. [STRING]
  330. # This flag controls whether the implicit-str-concat should generate a warning
  331. # on implicit string concatenation in sequences defined over several lines.
  332. check-str-concat-over-line-jumps=yes
  333. [EXCEPTIONS]
  334. # Exceptions that will emit a warning when being caught. Defaults to
  335. # "Exception"
  336. overgeneral-exceptions=builtins.Exception