pyproject.toml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. [tool.mypy]
  2. disallow_any_generics = true
  3. explicit_package_bases = true
  4. ignore_missing_imports = true
  5. namespace_packages = true
  6. no_implicit_optional = true
  7. pretty = true
  8. show_column_numbers = true
  9. warn_redundant_casts = true
  10. warn_return_any = true
  11. warn_unreachable = true
  12. exclude = ["thirdparty/"]
  13. python_version = "3.8"
  14. [tool.ruff]
  15. extend-exclude = ["thirdparty"]
  16. extend-include = ["*SConstruct", "*SCsub"]
  17. line-length = 120
  18. target-version = "py38"
  19. [tool.ruff.lint]
  20. extend-select = [
  21. "I", # isort
  22. "UP006", # Use {to} instead of {from} for type annotation
  23. "UP007", # Use `X | Y` for type annotations
  24. "UP037", # Remove quotes from type annotation
  25. "FA", # Future annotations
  26. ]
  27. extend-safe-fixes = ["UP006", "UP007", "FA"]
  28. [tool.ruff.lint.per-file-ignores]
  29. "{SConstruct,SCsub}" = [
  30. "E402", # Module level import not at top of file
  31. "F403", # Undefined local with import star
  32. "F405", # Undefined local with import star usage
  33. ]
  34. [tool.ruff.lint.isort]
  35. sections = { metadata = ["misc.utility.scons_hints"] }
  36. section-order = [
  37. "future",
  38. "metadata",
  39. "standard-library",
  40. "third-party",
  41. "first-party",
  42. "local-folder",
  43. ]
  44. [tool.codespell]
  45. enable-colors = true
  46. write-changes = true
  47. check-hidden = true
  48. quiet-level = 3
  49. builtin = ["clear", "rare", "en-GB_to_en-US"]
  50. skip = [
  51. ".mailmap",
  52. "*.desktop",
  53. "*.gitignore",
  54. "*.po",
  55. "*.pot",
  56. "*.rc",
  57. "AUTHORS.md",
  58. "COPYRIGHT.txt",
  59. "core/input/gamecontrollerdb.txt",
  60. "core/string/locales.h",
  61. "DONORS.md",
  62. "editor/project_converter_3_to_4.cpp",
  63. "platform/android/java/lib/src/main/java/com/*",
  64. "platform/web/package-lock.json",
  65. ]
  66. ignore-words-list = [
  67. "breaked",
  68. "cancelled",
  69. "checkin",
  70. "colour",
  71. "curvelinear",
  72. "doubleclick",
  73. "expct",
  74. "findn",
  75. "gird",
  76. "hel",
  77. "inout",
  78. "labelin",
  79. "lod",
  80. "masia",
  81. "mis",
  82. "nd",
  83. "numer",
  84. "ot",
  85. "outin",
  86. "parm",
  87. "pEvent",
  88. "requestor",
  89. "streamin",
  90. "te",
  91. "textin",
  92. "thirdparty",
  93. "vai",
  94. ]