pyproject.toml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. [project]
  2. requires-python = ">=3.10"
  3. [tool.ruff]
  4. exclude = [
  5. ]
  6. line-length = 120
  7. [tool.ruff.lint]
  8. ignore-init-module-imports = true
  9. select = [
  10. "B", # flake8-bugbear rules
  11. "F", # pyflakes rules
  12. "I", # isort rules
  13. "UP", # pyupgrade rules
  14. "E101", # mixed-spaces-and-tabs
  15. "E111", # indentation-with-invalid-multiple
  16. "E112", # no-indented-block
  17. "E113", # unexpected-indentation
  18. "E115", # no-indented-block-comment
  19. "E116", # unexpected-indentation-comment
  20. "E117", # over-indented
  21. "RUF019", # unnecessary-key-check
  22. "RUF100", # unused-noqa
  23. "RUF101", # redirected-noqa
  24. "S506", # unsafe-yaml-load
  25. "W191", # tab-indentation
  26. "W605", # invalid-escape-sequence
  27. ]
  28. ignore = [
  29. "F403", # undefined-local-with-import-star
  30. "F405", # undefined-local-with-import-star-usage
  31. "F821", # undefined-name
  32. "F841", # unused-variable
  33. "UP007", # non-pep604-annotation
  34. "UP032", # f-string
  35. "B005", # strip-with-multi-characters
  36. "B006", # mutable-argument-default
  37. "B007", # unused-loop-control-variable
  38. "B026", # star-arg-unpacking-after-keyword-arg
  39. "B904", # raise-without-from-inside-except
  40. "B905", # zip-without-explicit-strict
  41. ]
  42. [tool.ruff.lint.per-file-ignores]
  43. "app.py" = [
  44. "F401", # unused-import
  45. "F811", # redefined-while-unused
  46. ]
  47. "__init__.py" = [
  48. "F401", # unused-import
  49. "F811", # redefined-while-unused
  50. ]
  51. "tests/*" = [
  52. "F401", # unused-import
  53. "F811", # redefined-while-unused
  54. ]
  55. [tool.pytest_env]
  56. OPENAI_API_KEY = "sk-IamNotARealKeyJustForMockTestKawaiiiiiiiiii"
  57. AZURE_OPENAI_API_BASE = "https://difyai-openai.openai.azure.com"
  58. AZURE_OPENAI_API_KEY = "xxxxb1707exxxxxxxxxxaaxxxxxf94"
  59. ANTHROPIC_API_KEY = "sk-ant-api11-IamNotARealKeyJustForMockTestKawaiiiiiiiiii-NotBaka-ASkksz"
  60. CHATGLM_API_BASE = "http://a.abc.com:11451"
  61. XINFERENCE_SERVER_URL = "http://a.abc.com:11451"
  62. XINFERENCE_GENERATION_MODEL_UID = "generate"
  63. XINFERENCE_CHAT_MODEL_UID = "chat"
  64. XINFERENCE_EMBEDDINGS_MODEL_UID = "embedding"
  65. XINFERENCE_RERANK_MODEL_UID = "rerank"
  66. GOOGLE_API_KEY = "abcdefghijklmnopqrstuvwxyz"
  67. HUGGINGFACE_API_KEY = "hf-awuwuwuwuwuwuwuwuwuwuwuwuwuwuwuwuwu"
  68. HUGGINGFACE_TEXT_GEN_ENDPOINT_URL = "a"
  69. HUGGINGFACE_TEXT2TEXT_GEN_ENDPOINT_URL = "b"
  70. HUGGINGFACE_EMBEDDINGS_ENDPOINT_URL = "c"
  71. MOCK_SWITCH = "true"
  72. CODE_MAX_STRING_LENGTH = "80000"
  73. CODE_EXECUTION_ENDPOINT="http://127.0.0.1:8194"
  74. CODE_EXECUTION_API_KEY="dify-sandbox"