pyproject.toml 1.7 KB

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