pyproject.toml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. [tool.pytest.ini_options]
  2. DJANGO_SETTINGS_MODULE = "desktop.settings"
  3. console_output_style = "count"
  4. addopts = "-v -m 'not integration' --strict-markers --disable-warnings --html=report.html --self-contained-html"
  5. norecursedirs = "desktop/core/ext-py3"
  6. python_files = "tests.py test_*.py *_tests.py tests_* *_test.py"
  7. markers = [
  8. "integration: live server based tests",
  9. "requires_hadoop: live hadoop cluster based tests"
  10. ]
  11. [tool.ruff]
  12. target-version = "py38"
  13. line-length = 140
  14. indent-width = 2
  15. force-exclude = true
  16. extend-exclude = [
  17. "*/ext-py3/*",
  18. "desktop/core/src/desktop/lib/wsgiserver.py",
  19. "*/migrations/*",
  20. "apps/oozie/src/oozie/tests.py",
  21. "tools/ops/",
  22. "tools/ace-editor/",
  23. "*/gen-py/*",
  24. "*/org_migrations/*",
  25. "*/old_migrations/*",
  26. "desktop/core/src/desktop/app_template/src/app_name/*",
  27. "desktop/core/src/desktop/app_template_proxy/src/app_name/*"
  28. ]
  29. [tool.ruff.lint]
  30. preview = true
  31. select = [
  32. "E", # pycodestyle errors
  33. "W", # pycodestyle warnings
  34. "I", # isort
  35. ]
  36. ignore = [
  37. "E111",
  38. "E114",
  39. "E117",
  40. "W191",
  41. "E731"
  42. ]
  43. [tool.ruff.lint.per-file-ignores]
  44. "desktop/libs/notebook/src/notebook/connectors/altus.py" = ["E501"]
  45. "desktop/libs/notebook/src/notebook/connectors/altus_adb.py" = ["E501"]
  46. "desktop/libs/metadata/src/metadata/catalog/dummy_client.py" = ["E501"]
  47. "desktop/libs/liboozie/src/liboozie/submission2.py" = ["E501"]
  48. "desktop/libs/libanalyze/src/libanalyze/rules.py" = ["E501"]
  49. "apps/hbase/src/hbase/api.py" = ["E501"]
  50. "desktop/libs/librdbms/src/librdbms/server/mysql_lib.py" = ["E402"]
  51. "desktop/core/src/desktop/urls.py" = ["E402"]
  52. "desktop/core/src/desktop/lib/thrift_util_test.py" = ["E402"]
  53. "desktop/core/src/desktop/auth/backend.py" = ["E402"]
  54. [tool.ruff.format]
  55. docstring-code-format = true
  56. docstring-code-line-length = 140
  57. indent-style = "space"
  58. quote-style = "preserve"
  59. [tool.ruff.lint.isort]
  60. combine-as-imports = true
  61. length-sort-straight = true
  62. known-first-party = [
  63. "about",
  64. "beeswax",
  65. "filebrowser",
  66. "hbase",
  67. "help",
  68. "hive",
  69. "impala",
  70. "jobbrowser",
  71. "jobsub",
  72. "metastore",
  73. "oozie",
  74. "pig",
  75. "proxy",
  76. "rdbms",
  77. "search",
  78. "security",
  79. "spark",
  80. "sqoop",
  81. "useradmin",
  82. "zookeeper",
  83. "desktop",
  84. "aws",
  85. "azure",
  86. "dashboard",
  87. "hadoop",
  88. "indexer",
  89. "kafka",
  90. "libanalyze",
  91. "liboauth",
  92. "liboozie",
  93. "librdbms",
  94. "libsaml",
  95. "libsentry",
  96. "libsolr",
  97. "libzookeeper",
  98. "metadata",
  99. "notebook"
  100. ]