pyproject.toml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. "E731"
  41. ]
  42. [tool.ruff.lint.per-file-ignores]
  43. "desktop/libs/notebook/src/notebook/connectors/altus.py" = ["E501"]
  44. "desktop/libs/notebook/src/notebook/connectors/altus_adb.py" = ["E501"]
  45. "desktop/libs/metadata/src/metadata/catalog/dummy_client.py" = ["E501"]
  46. "desktop/libs/liboozie/src/liboozie/submission2.py" = ["E501"]
  47. "desktop/libs/libanalyze/src/libanalyze/rules.py" = ["E501"]
  48. "apps/hbase/src/hbase/api.py" = ["E501"]
  49. "desktop/libs/librdbms/src/librdbms/server/mysql_lib.py" = ["E402"]
  50. "desktop/core/src/desktop/urls.py" = ["E402"]
  51. "desktop/core/src/desktop/lib/thrift_util_test.py" = ["E402"]
  52. "desktop/core/src/desktop/auth/backend.py" = ["E402"]
  53. [tool.ruff.format]
  54. docstring-code-format = true
  55. docstring-code-line-length = 140
  56. indent-style = "space"
  57. quote-style = "preserve"
  58. [tool.ruff.lint.isort]
  59. combine-as-imports = true
  60. length-sort-straight = true
  61. known-first-party = [
  62. "about",
  63. "beeswax",
  64. "filebrowser",
  65. "hbase",
  66. "help",
  67. "hive",
  68. "impala",
  69. "jobbrowser",
  70. "jobsub",
  71. "metastore",
  72. "oozie",
  73. "pig",
  74. "proxy",
  75. "rdbms",
  76. "search",
  77. "security",
  78. "spark",
  79. "sqoop",
  80. "useradmin",
  81. "zookeeper",
  82. "desktop",
  83. "aws",
  84. "azure",
  85. "dashboard",
  86. "hadoop",
  87. "indexer",
  88. "kafka",
  89. "libanalyze",
  90. "liboauth",
  91. "liboozie",
  92. "librdbms",
  93. "libsaml",
  94. "libsentry",
  95. "libsolr",
  96. "libzookeeper",
  97. "metadata",
  98. "notebook"
  99. ]