flake8.conf 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  1. [flake8]
  2. select =
  3. E, W, # pep8 errors and warnings
  4. F, # pyflakes
  5. C9, # McCabe
  6. N8, # Naming Conventions
  7. PL, # Flake8-Pylint
  8. #B, S, # bandit
  9. #C, # commas
  10. #D, # docstrings
  11. #P, # string-format
  12. #Q, # quotes
  13. ignore =
  14. # closing bracket does not match indentation of opening bracket's line
  15. E123,
  16. # whitespace before ':'
  17. E203,
  18. # missing whitespace around arithmetic operator
  19. E226,
  20. # multiple spaces after ',' or tab after ','
  21. E24,
  22. # line break before binary operator
  23. W503,
  24. # line break after binary operator
  25. W504,
  26. # astroid-error
  27. PLF0002,
  28. # function-redefined
  29. PLE0102,
  30. # bad-reversed-sequence
  31. PLE0111,
  32. # no-method-argument
  33. PLE0211,
  34. # no-self-argument
  35. PLE0213,
  36. # access-member-before-definition
  37. PLE0203,
  38. # class-variable-slots-conflict
  39. PLE0242,
  40. # invalid-str-returned
  41. PLE0307,
  42. # invalid-hash-returned
  43. PLE0309,
  44. # relative-beyond-top-level
  45. PLE0402,
  46. # used-before-assignment
  47. PLE0601,
  48. # undefined-variable
  49. PLE0602,
  50. # undefined-all-variable
  51. PLE0603,
  52. # invalid-all-object
  53. PLE0604,
  54. # no-name-in-module
  55. PLE0611,
  56. # raising-bad-type
  57. PLE0702,
  58. # bad-super-call
  59. PLE1003,
  60. # bad-str-strip-call
  61. PLE1310,
  62. # not-async-context-manager
  63. PLE1701,
  64. # no-member
  65. PLE1101,
  66. # not-callable
  67. PLE1102,
  68. # assignment-from-no-return
  69. PLE1111,
  70. # no-value-for-parameter
  71. PLE1120,
  72. # too-many-function-args
  73. PLE1121,
  74. # unexpected-keyword-arg
  75. PLE1123,
  76. # redundant-keyword-arg
  77. PLE1124,
  78. # missing-kwoa
  79. PLE1125,
  80. # invalid-sequence-index
  81. PLE1126,
  82. # invalid-slice-index
  83. PLE1127,
  84. # assignment-from-none
  85. PLE1128,
  86. # not-context-manager
  87. PLE1129,
  88. # invalid-unary-operand-type
  89. PLE1130,
  90. # unsupported-binary-operation
  91. PLE1131,
  92. # repeated-keyword
  93. PLE1132,
  94. # not-an-iterable
  95. PLE1133,
  96. # not-a-mapping
  97. PLE1134,
  98. # unsupported-membership-test
  99. PLE1135,
  100. # unsubscriptable-object
  101. PLE1136,
  102. # unsupported-assignment-operation
  103. PLE1137,
  104. # unsupported-delete-operation
  105. PLE1138,
  106. # invalid-metaclass
  107. PLE1139,
  108. # dict-iter-missing-items
  109. PLE1141,
  110. # await-outside-async
  111. PLE1142,
  112. # unhashable-member
  113. PLE1143,
  114. # invalid-unicode-codec
  115. PLE2501,
  116. # bidirectional-unicode
  117. PLE2502,
  118. # invalid-character-backspace
  119. PLE2510,
  120. # invalid-character-carriage-return
  121. PLE2511,
  122. # invalid-character-sub
  123. PLE2512,
  124. # invalid-character-esc
  125. PLE2513,
  126. # invalid-character-nul
  127. PLE2514,
  128. # invalid-character-zero-width-space
  129. PLE2515,
  130. # import-error
  131. PLE0401,
  132. # invalid-name
  133. PLC0103,
  134. # disallowed-name
  135. PLC0104,
  136. # typevar-name-incorrect-variance
  137. PLC0105,
  138. # missing-module-docstring
  139. PLC0114,
  140. # missing-class-docstring
  141. PLC0115,
  142. # missing-function-docstring
  143. PLC0116,
  144. # singleton-comparison
  145. PLC0121,
  146. # unidiomatic-typecheck
  147. PLC0123,
  148. # typevar-double-variance
  149. PLC0131,
  150. # typevar-name-mismatch
  151. PLC0132,
  152. # consider-using-enumerate
  153. PLC0200,
  154. # consider-iterating-dictionary
  155. PLC0201,
  156. # bad-classmethod-argument
  157. PLC0202,
  158. # bad-mcs-classmethod-argument
  159. PLC0204,
  160. # single-string-used-for-slots
  161. PLC0205,
  162. # consider-using-dict-items
  163. PLC0206,
  164. # use-maxsplit-arg
  165. PLC0207,
  166. # use-sequence-for-iteration
  167. PLC0208,
  168. # consider-using-f-string
  169. PLC0209,
  170. # line-too-long
  171. PLC0301,
  172. # too-many-lines
  173. PLC0302,
  174. # trailing-whitespace
  175. PLC0303,
  176. # missing-final-newline
  177. PLC0304,
  178. # trailing-newlines
  179. PLC0305,
  180. # superfluous-parens
  181. PLC0325,
  182. # unexpected-line-ending-format
  183. PLC0328,
  184. # wrong-spelling-in-comment
  185. PLC0401,
  186. # wrong-spelling-in-docstring
  187. PLC0402,
  188. # invalid-characters-in-docstring
  189. PLC0403,
  190. # multiple-imports
  191. PLC0410,
  192. # wrong-import-order
  193. PLC0411,
  194. # ungrouped-imports
  195. PLC0412,
  196. # wrong-import-position
  197. PLC0413,
  198. # useless-import-alias
  199. PLC0414,
  200. # import-outside-toplevel
  201. PLC0415,
  202. # use-implicit-booleaness-not-len
  203. PLC1802,
  204. # use-implicit-booleaness-not-comparison
  205. PLC1803,
  206. # unnecessary-dunder-call
  207. PLC2801,
  208. # unnecessary-lambda-assignment
  209. PLC3001,
  210. # unnecessary-direct-lambda-call
  211. PLC3002,
  212. # raw-checker-failed
  213. PLI0001,
  214. # bad-inline-option
  215. PLI0010,
  216. # locally-disabled
  217. PLI0011,
  218. # file-ignored
  219. PLI0013,
  220. # suppressed-message
  221. PLI0020,
  222. # useless-suppression
  223. PLI0021,
  224. # deprecated-pragma
  225. PLI0022,
  226. # use-symbolic-message-instead
  227. PLI0023,
  228. # c-extension-no-member
  229. PLI1101,
  230. # useless-option-value
  231. PLR0022,
  232. # comparison-with-itself
  233. PLR0124,
  234. # comparison-of-constants
  235. PLR0133,
  236. # useless-object-inheritance
  237. PLR0205,
  238. # cyclic-import
  239. PLR0401,
  240. # consider-using-from-import
  241. PLR0402,
  242. # duplicate-code
  243. PLR0801,
  244. # too-many-ancestors
  245. PLR0901,
  246. # too-many-instance-attributes
  247. PLR0902,
  248. # too-few-public-methods
  249. PLR0903,
  250. # too-many-public-methods
  251. PLR0904,
  252. # too-many-return-statements
  253. PLR0911,
  254. # too-many-branches
  255. PLR0912,
  256. # too-many-arguments
  257. PLR0913,
  258. # too-many-locals
  259. PLR0914,
  260. # too-many-statements
  261. PLR0915,
  262. # too-many-boolean-expressions
  263. PLR0916,
  264. # consider-merging-isinstance
  265. PLR1701,
  266. # too-many-nested-blocks
  267. PLR1702,
  268. # simplifiable-if-statement
  269. PLR1703,
  270. # redefined-argument-from-local
  271. PLR1704,
  272. # no-else-return
  273. PLR1705,
  274. # consider-using-ternary
  275. PLR1706,
  276. # trailing-comma-tuple
  277. PLR1707,
  278. # stop-iteration-return
  279. PLR1708,
  280. # simplify-boolean-expression
  281. PLR1709,
  282. # inconsistent-return-statements
  283. PLR1710,
  284. # useless-return
  285. PLR1711,
  286. # consider-using-in
  287. PLR1714,
  288. # chained-comparison
  289. PLR1716,
  290. # consider-using-dict-comprehension
  291. PLR1717,
  292. # consider-using-set-comprehension
  293. PLR1718,
  294. # simplifiable-if-expression
  295. PLR1719,
  296. # no-else-raise
  297. PLR1720,
  298. # unnecessary-comprehension
  299. PLR1721,
  300. # consider-using-sys-exit
  301. PLR1722,
  302. # no-else-break
  303. PLR1723,
  304. # no-else-continue
  305. PLR1724,
  306. # super-with-arguments
  307. PLR1725,
  308. # consider-using-generator
  309. PLR1728,
  310. # use-a-generator
  311. PLR1729,
  312. # use-list-literal
  313. PLR1734,
  314. # use-dict-literal
  315. PLR1735,
  316. # unknown-option-value
  317. PLW0012,
  318. # unreachable
  319. PLW0101,
  320. # dangerous-default-value
  321. PLW0102,
  322. # pointless-statement
  323. PLW0104,
  324. # pointless-string-statement
  325. PLW0105,
  326. # expression-not-assigned
  327. PLW0106,
  328. # unnecessary-pass
  329. PLW0107,
  330. # unnecessary-lambda
  331. PLW0108,
  332. # useless-else-on-loop
  333. PLW0120,
  334. # eval-used
  335. PLW0123,
  336. # using-constant-test
  337. PLW0125,
  338. # missing-parentheses-for-call-in-test
  339. PLW0126,
  340. # self-assigning-variable
  341. PLW0127,
  342. # duplicate-value
  343. PLW0130,
  344. # comparison-with-callable
  345. PLW0143,
  346. # nan-comparison
  347. PLW0177,
  348. # assert-on-tuple
  349. PLW0199,
  350. # attribute-defined-outside-init
  351. PLW0201,
  352. # protected-access
  353. PLW0212,
  354. # arguments-differ
  355. PLW0221,
  356. # abstract-method
  357. PLW0223,
  358. # super-init-not-called
  359. PLW0231,
  360. # non-parent-init-called
  361. PLW0233,
  362. # invalid-overridden-method
  363. PLW0236,
  364. # arguments-renamed
  365. PLW0237,
  366. # unused-private-member
  367. PLW0238,
  368. # overridden-final-method
  369. PLW0239,
  370. # subclassed-final-class
  371. PLW0240,
  372. # useless-parent-delegation
  373. PLW0246,
  374. # unnecessary-semicolon
  375. PLW0301,
  376. # wildcard-import
  377. PLW0401,
  378. # reimported
  379. PLW0404,
  380. # import-self
  381. PLW0406,
  382. # preferred-module
  383. PLW0407,
  384. # misplaced-future
  385. PLW0410,
  386. # fixme
  387. PLW0511,
  388. # global-variable-not-assigned
  389. PLW0602,
  390. # global-statement
  391. PLW0603,
  392. # global-at-module-level
  393. PLW0604,
  394. # unused-import
  395. PLW0611,
  396. # unused-variable
  397. PLW0612,
  398. # unused-argument
  399. PLW0613,
  400. # unused-wildcard-import
  401. PLW0614,
  402. # redefined-outer-name
  403. PLW0621,
  404. # redefined-builtin
  405. PLW0622,
  406. # undefined-loop-variable
  407. PLW0631,
  408. # unbalanced-tuple-unpacking
  409. PLW0632,
  410. # cell-var-from-loop
  411. PLW0640,
  412. # possibly-unused-variable
  413. PLW0641,
  414. # bare-except
  415. PLW0702,
  416. # broad-except
  417. PLW0703,
  418. # try-except-raise
  419. PLW0706,
  420. # raise-missing-from
  421. PLW0707,
  422. # raising-format-tuple
  423. PLW0715,
  424. # wrong-exception-operation
  425. PLW0716,
  426. # keyword-arg-before-vararg
  427. PLW1113,
  428. # arguments-out-of-order
  429. PLW1114,
  430. # non-str-assignment-to-dunder-name
  431. PLW1115,
  432. # isinstance-second-argument-not-valid-type
  433. PLW1116,
  434. # logging-not-lazy
  435. PLW1201,
  436. # logging-format-interpolation
  437. PLW1202,
  438. # logging-fstring-interpolation
  439. PLW1203,
  440. # bad-format-string-key
  441. PLW1300,
  442. # unused-format-string-key
  443. PLW1301,
  444. # bad-format-string
  445. PLW1302,
  446. # missing-format-argument-key
  447. PLW1303,
  448. # unused-format-string-argument
  449. PLW1304,
  450. # format-combined-specification
  451. PLW1305,
  452. # missing-format-attribute
  453. PLW1306,
  454. # invalid-format-index
  455. PLW1307,
  456. # duplicate-string-formatting-argument
  457. PLW1308,
  458. # anomalous-backslash-in-string
  459. PLW1401,
  460. # anomalous-unicode-escape-in-string
  461. PLW1402,
  462. # implicit-str-concat
  463. PLW1404,
  464. # inconsistent-quotes
  465. PLW1405,
  466. # redundant-u-string-prefix
  467. PLW1406,
  468. # bad-open-mode
  469. PLW1501,
  470. # boolean-datetime
  471. PLW1502,
  472. # redundant-unittest-assert
  473. PLW1503,
  474. # bad-thread-instantiation
  475. PLW1506,
  476. # shallow-copy-environ
  477. PLW1507,
  478. # invalid-envvar-default
  479. PLW1508,
  480. # subprocess-popen-preexec-fn
  481. PLW1509,
  482. # subprocess-run-check
  483. PLW1510,
  484. # unspecified-encoding
  485. PLW1514,
  486. # forgotten-debug-statement
  487. PLW1515,
  488. # method-cache-max-size-none
  489. PLW1518,
  490. # useless-with-lock
  491. PLW2101,
  492. # non-ascii-file-name
  493. PLW2402,
  494. # using-f-string-in-unsupported-version
  495. PLW2601,
  496. # using-final-decorator-in-unsupported-version
  497. PLW2602,
  498. # missing-timeout
  499. PLW3101,
  500. # deprecated-module
  501. PLW4901,
  502. # deprecated-argument
  503. PLW4903,
  504. # deprecated-class
  505. PLW4904,
  506. # deprecated-decorator
  507. PLW4905,
  508. max-line-length = 200