flake8.conf 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565
  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. # too-many-positional-arguments
  281. PLR917,
  282. # consider-merging-isinstance
  283. PLR701,
  284. # too-many-nested-blocks
  285. PLR702,
  286. # simplifiable-if-statement
  287. PLR703,
  288. # redefined-argument-from-local
  289. PLR704,
  290. # no-else-return
  291. PLR705,
  292. # consider-using-ternary
  293. PLR706,
  294. # trailing-comma-tuple
  295. PLR707,
  296. # stop-iteration-return
  297. PLR708,
  298. # simplify-boolean-expression
  299. PLR709,
  300. # inconsistent-return-statements
  301. PLR710,
  302. # useless-return
  303. PLR711,
  304. # consider-using-join
  305. PLR713,
  306. # consider-using-in
  307. PLR714,
  308. # chained-comparison
  309. PLR716,
  310. # consider-using-dict-comprehension
  311. PLR717,
  312. # consider-using-set-comprehension
  313. PLR718,
  314. # simplifiable-if-expression
  315. PLR719,
  316. # no-else-raise
  317. PLR720,
  318. # unnecessary-comprehension
  319. PLR721,
  320. # consider-using-sys-exit
  321. PLR722,
  322. # no-else-break
  323. PLR723,
  324. # no-else-continue
  325. PLR724,
  326. # super-with-arguments
  327. PLR725,
  328. # consider-using-generator
  329. PLR728,
  330. # use-a-generator
  331. PLR729,
  332. # consider-using-min-builtin
  333. PLR730,
  334. # consider-using-max-builtin
  335. PLR731,
  336. # consider-using-with
  337. PLR732,
  338. # use-list-literal
  339. PLR734,
  340. # use-dict-literal
  341. PLR735,
  342. # use-yield-from
  343. PLR737,
  344. # unknown-option-value
  345. PLW012,
  346. # unreachable
  347. PLW101,
  348. # dangerous-default-value
  349. PLW102,
  350. # pointless-statement
  351. PLW104,
  352. # pointless-string-statement
  353. PLW105,
  354. # expression-not-assigned
  355. PLW106,
  356. # unnecessary-pass
  357. PLW107,
  358. # unnecessary-lambda
  359. PLW108,
  360. # useless-else-on-loop
  361. PLW120,
  362. # exec-used
  363. PLW122,
  364. # eval-used
  365. PLW123,
  366. # using-constant-test
  367. PLW125,
  368. # missing-parentheses-for-call-in-test
  369. PLW126,
  370. # self-assigning-variable
  371. PLW127,
  372. # assert-on-string-literal
  373. PLW129,
  374. # duplicate-value
  375. PLW130,
  376. # pointless-exception-statement
  377. PLW133,
  378. # return-in-finally
  379. PLW134,
  380. # contextmanager-generator-missing-cleanup
  381. PLW135,
  382. # comparison-with-callable
  383. PLW143,
  384. # lost-exception
  385. PLW150,
  386. # nan-comparison
  387. PLW177,
  388. # assert-on-tuple
  389. PLW199,
  390. # attribute-defined-outside-init
  391. PLW201,
  392. # protected-access
  393. PLW212,
  394. # arguments-differ
  395. PLW221,
  396. # abstract-method
  397. PLW223,
  398. # super-init-not-called
  399. PLW231,
  400. # non-parent-init-called
  401. PLW233,
  402. # invalid-overridden-method
  403. PLW236,
  404. # arguments-renamed
  405. PLW237,
  406. # unused-private-member
  407. PLW238,
  408. # overridden-final-method
  409. PLW239,
  410. # subclassed-final-class
  411. PLW240,
  412. # useless-parent-delegation
  413. PLW246,
  414. # unnecessary-semicolon
  415. PLW301,
  416. # f-string-without-interpolation
  417. PLW309,
  418. # format-string-without-interpolation
  419. PLW310,
  420. # wildcard-import
  421. PLW401,
  422. # reimported
  423. PLW404,
  424. # import-self
  425. PLW406,
  426. # preferred-module
  427. PLW407,
  428. # misplaced-future
  429. PLW410,
  430. # fixme
  431. PLW511,
  432. # global-variable-not-assigned
  433. PLW602,
  434. # global-statement
  435. PLW603,
  436. # global-at-module-level
  437. PLW604,
  438. # unused-import
  439. PLW611,
  440. # unused-variable
  441. PLW612,
  442. # unused-argument
  443. PLW613,
  444. # unused-wildcard-import
  445. PLW614,
  446. # redefined-outer-name
  447. PLW621,
  448. # redefined-builtin
  449. PLW622,
  450. # undefined-loop-variable
  451. PLW631,
  452. # unbalanced-tuple-unpacking
  453. PLW632,
  454. # cell-var-from-loop
  455. PLW640,
  456. # possibly-unused-variable
  457. PLW641,
  458. # bare-except
  459. PLW702,
  460. # broad-except
  461. PLW703,
  462. # try-except-raise
  463. PLW706,
  464. # raise-missing-from
  465. PLW707,
  466. # raising-format-tuple
  467. PLW715,
  468. # wrong-exception-operation
  469. PLW716,
  470. # keyword-arg-before-vararg
  471. PLW113,
  472. # arguments-out-of-order
  473. PLW114,
  474. # non-str-assignment-to-dunder-name
  475. PLW115,
  476. # isinstance-second-argument-not-valid-type
  477. PLW116,
  478. # logging-not-lazy
  479. PLW201,
  480. # logging-format-interpolation
  481. PLW202,
  482. # logging-fstring-interpolation
  483. PLW203,
  484. # bad-format-string-key
  485. PLW300,
  486. # unused-format-string-key
  487. PLW301,
  488. # bad-format-string
  489. PLW302,
  490. # missing-format-argument-key
  491. PLW303,
  492. # unused-format-string-argument
  493. PLW304,
  494. # format-combined-specification
  495. PLW305,
  496. # missing-format-attribute
  497. PLW306,
  498. # invalid-format-index
  499. PLW307,
  500. # duplicate-string-formatting-argument
  501. PLW308,
  502. # anomalous-backslash-in-string
  503. PLW401,
  504. # anomalous-unicode-escape-in-string
  505. PLW402,
  506. # implicit-str-concat
  507. PLW404,
  508. # inconsistent-quotes
  509. PLW405,
  510. # redundant-u-string-prefix
  511. PLW406,
  512. # bad-open-mode
  513. PLW501,
  514. # boolean-datetime
  515. PLW502,
  516. # redundant-unittest-assert
  517. PLW503,
  518. # bad-thread-instantiation
  519. PLW506,
  520. # shallow-copy-environ
  521. PLW507,
  522. # invalid-envvar-default
  523. PLW508,
  524. # subprocess-popen-preexec-fn
  525. PLW509,
  526. # subprocess-run-check
  527. PLW510,
  528. # unspecified-encoding
  529. PLW514,
  530. # forgotten-debug-statement
  531. PLW515,
  532. # method-cache-max-size-none
  533. PLW518,
  534. # useless-with-lock
  535. PLW101,
  536. # non-ascii-file-name
  537. PLW402,
  538. # using-f-string-in-unsupported-version
  539. PLW601,
  540. # using-final-decorator-in-unsupported-version
  541. PLW602,
  542. # broad-exception-caught
  543. PLW718,
  544. # broad-exception-raised
  545. PLW719,
  546. # missing-timeout
  547. PLW101,
  548. # deprecated-module
  549. PLW901,
  550. # deprecated-argument
  551. PLW903,
  552. # deprecated-class
  553. PLW904,
  554. # deprecated-decorator
  555. PLW905,
  556. max-line-length = 200