pyproject.toml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. [build-system]
  2. requires = [
  3. "setuptools>=57",
  4. "wheel>=0.36.0",
  5. "build>=0.5.1",
  6. ]
  7. build-backend = "setuptools.build_meta"
  8. [tool.ruff.lint]
  9. ignore = [
  10. "E401", # multiple imports per line
  11. "E701", # multiple statements per line
  12. "E721", # use isinstance()
  13. "E731", # lambda instead of def
  14. "E402", # module import not top of file
  15. "E722", # bare except
  16. "E713", # membership 'not in'
  17. "E741", # ambiguous variable name
  18. ]
  19. [tool.ruff.lint.per-file-ignores]
  20. "mmgen/proto/eth/pyethereum/*" = [ "F401" ] # imported but unused
  21. "mmgen/proto/eth/rlp/sedes/*" = [ "F401" ] # imported but unused
  22. "mmgen/addrgen.py" = [ "F401" ] # imported but unused
  23. "mmgen/tool/*" = [
  24. "F722", # Syntax error in forward annotation
  25. "F821" # Undefined name `sstr`
  26. ]
  27. "test/include/common.py" = [ "F821" ] # undefined name 'cfg'
  28. "test/misc/input_func.py" = [ "F401" ] # imported but unused
  29. "test/modtest_d/ut_cashaddr.py" = [ "F841" ] # assigned to but never used
  30. "test/modtest_d/ut_dep.py" = [ "F401" ] # imported but unused
  31. "test/modtest_d/ut_testdep.py" = [ "F401" ] # imported but unused
  32. "test/modtest_d/ut_obj.py" = [ "F841" ] # assigned to but never used
  33. "test/objtest_d/*" = [ "F401" ] # imported but unused
  34. "test/objattrtest_d/*" = [ "F401" ] # imported but unused
  35. "test/overlay/fakemods/*" = [ "F403", "F405" ] # `import *` used
  36. "test/*.py" = [ "F401" ] # imported but unused
  37. "test/colortest.py" = [ "F403", "F405" ] # `import *` used
  38. "test/tooltest2.py" = [ "F403", "F405" ] # `import *` used
  39. [tool.pylint.format]
  40. indent-string = "\t"
  41. indent-after-paren = 2
  42. max-line-length = 116
  43. [tool.pylint.main]
  44. recursive = true
  45. jobs = 0
  46. ignore = [
  47. "data",
  48. "wordlist",
  49. "pyethereum",
  50. "rlp",
  51. "main_split.py",
  52. "ut_tx.py",
  53. ]
  54. ignored-modules = [ # ignored for no-member, otherwise checked
  55. "mmgen.proto.secp256k1.secp256k1",
  56. "mmgen.term",
  57. "msvcrt",
  58. "gmpy2",
  59. ]
  60. [tool.pylint."messages control"]
  61. disable = [
  62. "raw-checker-failed",
  63. "bad-inline-option",
  64. "locally-disabled",
  65. "file-ignored",
  66. "suppressed-message",
  67. "useless-suppression",
  68. "deprecated-pragma",
  69. "use-symbolic-message-instead",
  70. "use-implicit-booleaness-not-comparison-to-string",
  71. "use-implicit-booleaness-not-comparison-to-zero",
  72. "not-async-context-manager",
  73. # non-default:
  74. "no-method-argument",
  75. "function-redefined",
  76. "method-hidden",
  77. ]
  78. [tool.pylint.miscellaneous]
  79. notes = ["FIXME", "TODO", "DEBUG", "WIP"]
  80. [tool.pylint.typecheck]
  81. mixin-class-rgx = """.*[Mm]ixin|\
  82. ^(Hilite|InitErrors|DummyWIF|\
  83. cfg_file|cfg_file_sample|\
  84. MoneroMMGenFile|keygen_base|xmr_signable|\
  85. CmdTestShared)$"""
  86. ignored-classes = [ # ignored for no-member, otherwise checked
  87. "optparse.Values",
  88. "thread._local",
  89. "_thread._local",
  90. "argparse.Namespace",
  91. # mmgen:
  92. "baseconv",
  93. "mmgen.autosign.Signable.base",
  94. "mmgen.autosign.Autosign", # tx_dir, etc. created dynamically
  95. "Sha2",
  96. "mmgen.xmrwallet.file.MoneroMMGenTX.Base",
  97. "mmgen.xmrwallet.file.MoneroWalletOutputsFile.Base",
  98. "mmgen.xmrwallet.ops.sweep.OpSweep",
  99. "mmgen.xmrwallet.ops.wallet.OpWallet",
  100. "mmgen.xmrwallet.ops.label.OpLabel",
  101. "mmgen.xmrwallet.ops.new.OpNew",
  102. "mmgen.xmrwallet.ops.txview.OpTxview",
  103. "mmgen.xmrwallet.file.outputs.MoneroWalletOutputsFile.Base",
  104. "mmgen.xmrwallet.file.tx.MoneroMMGenTX.Base",
  105. "mmgen.proto.eth.tx.Completed",
  106. "TxInfo",
  107. "TwRPC",
  108. "MnemonicEntry",
  109. "MMGenObjectDevTools",
  110. "MnEntryMode",
  111. "deserialized_tx",
  112. # test suite:
  113. "TestHashFunc",
  114. "GenTool",
  115. "VirtBlockDeviceBase",
  116. "SwapMgrBase",
  117. "Opts",
  118. "Help",
  119. "FFI_override",
  120. ]