flake8.conf 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563
  1. [flake8]
  2. jobs = 2
  3. select =
  4. E, W, # pep8 errors and warnings
  5. F, # pyflakes
  6. C9, # McCabe
  7. N8, # Naming Conventions
  8. PL, # Flake8-Pylint
  9. #B, S, # bandit
  10. #C, # commas
  11. #D, # docstrings
  12. #P, # string-format
  13. #Q, # quotes
  14. ignore =
  15. # closing bracket does not match indentation of opening bracket's line
  16. E123,
  17. # whitespace before ':' (for black https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#e203)
  18. E203,
  19. # missing whitespace around arithmetic operator
  20. E226,
  21. # multiple spaces after ',' or tab after ','
  22. E24,
  23. # multiple statements on one line (for black https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#e701-e704)
  24. E701,
  25. E704,
  26. # line break before binary operator
  27. W503,
  28. # line break after binary operator
  29. W504,
  30. # astroid-error
  31. PLF002,
  32. # function-redefined
  33. PLE102,
  34. # bad-reversed-sequence
  35. PLE111,
  36. # method-hidden
  37. PLE202,
  38. # no-method-argument
  39. PLE211,
  40. # no-self-argument
  41. PLE213,
  42. # access-member-before-definition
  43. PLE203,
  44. # class-variable-slots-conflict
  45. PLE242,
  46. # invalid-str-returned
  47. PLE307,
  48. # invalid-hash-returned
  49. PLE309,
  50. # relative-beyond-top-level
  51. PLE402,
  52. # used-before-assignment
  53. PLE601,
  54. # undefined-variable
  55. PLE602,
  56. # undefined-all-variable
  57. PLE603,
  58. # invalid-all-object
  59. PLE604,
  60. # no-name-in-module
  61. PLE611,
  62. # raising-bad-type
  63. PLE702,
  64. # catching-non-exception
  65. PLE712,
  66. # bad-super-call
  67. PLE003,
  68. # bad-str-strip-call
  69. PLE310,
  70. # not-async-context-manager
  71. PLE701,
  72. # no-member
  73. PLE101,
  74. # not-callable
  75. PLE102,
  76. # assignment-from-no-return
  77. PLE111,
  78. # no-value-for-parameter
  79. PLE120,
  80. # too-many-function-args
  81. PLE121,
  82. # unexpected-keyword-arg
  83. PLE123,
  84. # redundant-keyword-arg
  85. PLE124,
  86. # missing-kwoa
  87. PLE125,
  88. # invalid-sequence-index
  89. PLE126,
  90. # invalid-slice-index
  91. PLE127,
  92. # assignment-from-none
  93. PLE128,
  94. # not-context-manager
  95. PLE129,
  96. # invalid-unary-operand-type
  97. PLE130,
  98. # unsupported-binary-operation
  99. PLE131,
  100. # repeated-keyword
  101. PLE132,
  102. # not-an-iterable
  103. PLE133,
  104. # not-a-mapping
  105. PLE134,
  106. # unsupported-membership-test
  107. PLE135,
  108. # unsubscriptable-object
  109. PLE136,
  110. # unsupported-assignment-operation
  111. PLE137,
  112. # unsupported-delete-operation
  113. PLE138,
  114. # invalid-metaclass
  115. PLE139,
  116. # dict-iter-missing-items
  117. PLE141,
  118. # await-outside-async
  119. PLE142,
  120. # unhashable-member
  121. PLE143,
  122. # invalid-unicode-codec
  123. PLE501,
  124. # bidirectional-unicode
  125. PLE502,
  126. # invalid-character-backspace
  127. PLE510,
  128. # invalid-character-carriage-return
  129. PLE511,
  130. # invalid-character-sub
  131. PLE512,
  132. # invalid-character-esc
  133. PLE513,
  134. # invalid-character-nul
  135. PLE514,
  136. # invalid-character-zero-width-space
  137. PLE515,
  138. # import-error
  139. PLE401,
  140. # possibly-used-before-assignment
  141. PLE606,
  142. # invalid-name
  143. PLC103,
  144. # disallowed-name
  145. PLC104,
  146. # typevar-name-incorrect-variance
  147. PLC105,
  148. # empty-docstring
  149. PLC112,
  150. # missing-module-docstring
  151. PLC114,
  152. # missing-class-docstring
  153. PLC115,
  154. # missing-function-docstring
  155. PLC116,
  156. # unnecessary-negation
  157. PLC117,
  158. # singleton-comparison
  159. PLC121,
  160. # unidiomatic-typecheck
  161. PLC123,
  162. # typevar-double-variance
  163. PLC131,
  164. # typevar-name-mismatch
  165. PLC132,
  166. # consider-using-enumerate
  167. PLC200,
  168. # consider-iterating-dictionary
  169. PLC201,
  170. # bad-classmethod-argument
  171. PLC202,
  172. # bad-mcs-classmethod-argument
  173. PLC204,
  174. # single-string-used-for-slots
  175. PLC205,
  176. # consider-using-dict-items
  177. PLC206,
  178. # use-maxsplit-arg
  179. PLC207,
  180. # use-sequence-for-iteration
  181. PLC208,
  182. # consider-using-f-string
  183. PLC209,
  184. # line-too-long
  185. PLC301,
  186. # too-many-lines
  187. PLC302,
  188. # trailing-whitespace
  189. PLC303,
  190. # missing-final-newline
  191. PLC304,
  192. # trailing-newlines
  193. PLC305,
  194. # superfluous-parens
  195. PLC325,
  196. # unexpected-line-ending-format
  197. PLC328,
  198. # wrong-spelling-in-comment
  199. PLC401,
  200. # wrong-spelling-in-docstring
  201. PLC402,
  202. # invalid-characters-in-docstring
  203. PLC403,
  204. # multiple-imports
  205. PLC410,
  206. # wrong-import-order
  207. PLC411,
  208. # ungrouped-imports
  209. PLC412,
  210. # wrong-import-position
  211. PLC413,
  212. # useless-import-alias
  213. PLC414,
  214. # import-outside-toplevel
  215. PLC415,
  216. # use-implicit-booleaness-not-len
  217. PLC802,
  218. # use-implicit-booleaness-not-comparison
  219. PLC803,
  220. # unnecessary-dunder-call
  221. PLC801,
  222. # unnecessary-lambda-assignment
  223. PLC001,
  224. # unnecessary-direct-lambda-call
  225. PLC002,
  226. # raw-checker-failed
  227. PLI001,
  228. # bad-inline-option
  229. PLI010,
  230. # locally-disabled
  231. PLI011,
  232. # file-ignored
  233. PLI013,
  234. # suppressed-message
  235. PLI020,
  236. # useless-suppression
  237. PLI021,
  238. # deprecated-pragma
  239. PLI022,
  240. # use-symbolic-message-instead
  241. PLI023,
  242. # c-extension-no-member
  243. PLI101,
  244. # useless-option-value
  245. PLR022,
  246. # comparison-with-itself
  247. PLR124,
  248. # comparison-of-constants
  249. PLR133,
  250. # useless-object-inheritance
  251. PLR205,
  252. # property-with-parameters
  253. PLR206,
  254. # cyclic-import
  255. PLR401,
  256. # consider-using-from-import
  257. PLR402,
  258. # duplicate-code
  259. PLR801,
  260. # too-many-ancestors
  261. PLR901,
  262. # too-many-instance-attributes
  263. PLR902,
  264. # too-few-public-methods
  265. PLR903,
  266. # too-many-public-methods
  267. PLR904,
  268. # too-many-return-statements
  269. PLR911,
  270. # too-many-branches
  271. PLR912,
  272. # too-many-arguments
  273. PLR913,
  274. # too-many-locals
  275. PLR914,
  276. # too-many-statements
  277. PLR915,
  278. # too-many-boolean-expressions
  279. PLR916,
  280. # consider-merging-isinstance
  281. PLR701,
  282. # too-many-nested-blocks
  283. PLR702,
  284. # simplifiable-if-statement
  285. PLR703,
  286. # redefined-argument-from-local
  287. PLR704,
  288. # no-else-return
  289. PLR705,
  290. # consider-using-ternary
  291. PLR706,
  292. # trailing-comma-tuple
  293. PLR707,
  294. # stop-iteration-return
  295. PLR708,
  296. # simplify-boolean-expression
  297. PLR709,
  298. # inconsistent-return-statements
  299. PLR710,
  300. # useless-return
  301. PLR711,
  302. # consider-using-join
  303. PLR713,
  304. # consider-using-in
  305. PLR714,
  306. # chained-comparison
  307. PLR716,
  308. # consider-using-dict-comprehension
  309. PLR717,
  310. # consider-using-set-comprehension
  311. PLR718,
  312. # simplifiable-if-expression
  313. PLR719,
  314. # no-else-raise
  315. PLR720,
  316. # unnecessary-comprehension
  317. PLR721,
  318. # consider-using-sys-exit
  319. PLR722,
  320. # no-else-break
  321. PLR723,
  322. # no-else-continue
  323. PLR724,
  324. # super-with-arguments
  325. PLR725,
  326. # consider-using-generator
  327. PLR728,
  328. # use-a-generator
  329. PLR729,
  330. # consider-using-min-builtin
  331. PLR730,
  332. # consider-using-max-builtin
  333. PLR731,
  334. # consider-using-with
  335. PLR732,
  336. # use-list-literal
  337. PLR734,
  338. # use-dict-literal
  339. PLR735,
  340. # use-yield-from
  341. PLR737,
  342. # unknown-option-value
  343. PLW012,
  344. # unreachable
  345. PLW101,
  346. # dangerous-default-value
  347. PLW102,
  348. # pointless-statement
  349. PLW104,
  350. # pointless-string-statement
  351. PLW105,
  352. # expression-not-assigned
  353. PLW106,
  354. # unnecessary-pass
  355. PLW107,
  356. # unnecessary-lambda
  357. PLW108,
  358. # useless-else-on-loop
  359. PLW120,
  360. # exec-used
  361. PLW122,
  362. # eval-used
  363. PLW123,
  364. # using-constant-test
  365. PLW125,
  366. # missing-parentheses-for-call-in-test
  367. PLW126,
  368. # self-assigning-variable
  369. PLW127,
  370. # assert-on-string-literal
  371. PLW129,
  372. # duplicate-value
  373. PLW130,
  374. # pointless-exception-statement
  375. PLW133,
  376. # return-in-finally
  377. PLW134,
  378. # contextmanager-generator-missing-cleanup
  379. PLW135,
  380. # comparison-with-callable
  381. PLW143,
  382. # lost-exception
  383. PLW150,
  384. # nan-comparison
  385. PLW177,
  386. # assert-on-tuple
  387. PLW199,
  388. # attribute-defined-outside-init
  389. PLW201,
  390. # protected-access
  391. PLW212,
  392. # arguments-differ
  393. PLW221,
  394. # abstract-method
  395. PLW223,
  396. # super-init-not-called
  397. PLW231,
  398. # non-parent-init-called
  399. PLW233,
  400. # invalid-overridden-method
  401. PLW236,
  402. # arguments-renamed
  403. PLW237,
  404. # unused-private-member
  405. PLW238,
  406. # overridden-final-method
  407. PLW239,
  408. # subclassed-final-class
  409. PLW240,
  410. # useless-parent-delegation
  411. PLW246,
  412. # unnecessary-semicolon
  413. PLW301,
  414. # f-string-without-interpolation
  415. PLW309,
  416. # format-string-without-interpolation
  417. PLW310,
  418. # wildcard-import
  419. PLW401,
  420. # reimported
  421. PLW404,
  422. # import-self
  423. PLW406,
  424. # preferred-module
  425. PLW407,
  426. # misplaced-future
  427. PLW410,
  428. # fixme
  429. PLW511,
  430. # global-variable-not-assigned
  431. PLW602,
  432. # global-statement
  433. PLW603,
  434. # global-at-module-level
  435. PLW604,
  436. # unused-import
  437. PLW611,
  438. # unused-variable
  439. PLW612,
  440. # unused-argument
  441. PLW613,
  442. # unused-wildcard-import
  443. PLW614,
  444. # redefined-outer-name
  445. PLW621,
  446. # redefined-builtin
  447. PLW622,
  448. # undefined-loop-variable
  449. PLW631,
  450. # unbalanced-tuple-unpacking
  451. PLW632,
  452. # cell-var-from-loop
  453. PLW640,
  454. # possibly-unused-variable
  455. PLW641,
  456. # bare-except
  457. PLW702,
  458. # broad-except
  459. PLW703,
  460. # try-except-raise
  461. PLW706,
  462. # raise-missing-from
  463. PLW707,
  464. # raising-format-tuple
  465. PLW715,
  466. # wrong-exception-operation
  467. PLW716,
  468. # keyword-arg-before-vararg
  469. PLW113,
  470. # arguments-out-of-order
  471. PLW114,
  472. # non-str-assignment-to-dunder-name
  473. PLW115,
  474. # isinstance-second-argument-not-valid-type
  475. PLW116,
  476. # logging-not-lazy
  477. PLW201,
  478. # logging-format-interpolation
  479. PLW202,
  480. # logging-fstring-interpolation
  481. PLW203,
  482. # bad-format-string-key
  483. PLW300,
  484. # unused-format-string-key
  485. PLW301,
  486. # bad-format-string
  487. PLW302,
  488. # missing-format-argument-key
  489. PLW303,
  490. # unused-format-string-argument
  491. PLW304,
  492. # format-combined-specification
  493. PLW305,
  494. # missing-format-attribute
  495. PLW306,
  496. # invalid-format-index
  497. PLW307,
  498. # duplicate-string-formatting-argument
  499. PLW308,
  500. # anomalous-backslash-in-string
  501. PLW401,
  502. # anomalous-unicode-escape-in-string
  503. PLW402,
  504. # implicit-str-concat
  505. PLW404,
  506. # inconsistent-quotes
  507. PLW405,
  508. # redundant-u-string-prefix
  509. PLW406,
  510. # bad-open-mode
  511. PLW501,
  512. # boolean-datetime
  513. PLW502,
  514. # redundant-unittest-assert
  515. PLW503,
  516. # bad-thread-instantiation
  517. PLW506,
  518. # shallow-copy-environ
  519. PLW507,
  520. # invalid-envvar-default
  521. PLW508,
  522. # subprocess-popen-preexec-fn
  523. PLW509,
  524. # subprocess-run-check
  525. PLW510,
  526. # unspecified-encoding
  527. PLW514,
  528. # forgotten-debug-statement
  529. PLW515,
  530. # method-cache-max-size-none
  531. PLW518,
  532. # useless-with-lock
  533. PLW101,
  534. # non-ascii-file-name
  535. PLW402,
  536. # using-f-string-in-unsupported-version
  537. PLW601,
  538. # using-final-decorator-in-unsupported-version
  539. PLW602,
  540. # broad-exception-caught
  541. PLW718,
  542. # broad-exception-raised
  543. PLW719,
  544. # missing-timeout
  545. PLW101,
  546. # deprecated-module
  547. PLW901,
  548. # deprecated-argument
  549. PLW903,
  550. # deprecated-class
  551. PLW904,
  552. # deprecated-decorator
  553. PLW905,
  554. max-line-length = 200