pyproject.toml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. "F", # pyflakes rules
  11. "I001", # unsorted-imports
  12. "I002", # missing-required-import
  13. "UP", # pyupgrade rules
  14. "RUF019", # unnecessary-key-check
  15. ]
  16. ignore = [
  17. "F403", # undefined-local-with-import-star
  18. "F405", # undefined-local-with-import-star-usage
  19. "F821", # undefined-name
  20. "F841", # unused-variable
  21. "UP007", # non-pep604-annotation
  22. "UP032", # f-string
  23. ]
  24. [tool.ruff.lint.per-file-ignores]
  25. "app.py" = [
  26. "F401", # unused-import
  27. "F811", # redefined-while-unused
  28. ]
  29. "__init__.py" = [
  30. "F401", # unused-import
  31. "F811", # redefined-while-unused
  32. ]
  33. "tests/*" = [
  34. "F401", # unused-import
  35. "F811", # redefined-while-unused
  36. ]
  37. [tool.pytest_env]
  38. OPENAI_API_KEY = "sk-IamNotARealKeyJustForMockTestKawaiiiiiiiiii"
  39. AZURE_OPENAI_API_BASE = "https://difyai-openai.openai.azure.com"
  40. AZURE_OPENAI_API_KEY = "xxxxb1707exxxxxxxxxxaaxxxxxf94"
  41. ANTHROPIC_API_KEY = "sk-ant-api11-IamNotARealKeyJustForMockTestKawaiiiiiiiiii-NotBaka-ASkksz"
  42. CHATGLM_API_BASE = "http://a.abc.com:11451"
  43. XINFERENCE_SERVER_URL = "http://a.abc.com:11451"
  44. XINFERENCE_GENERATION_MODEL_UID = "generate"
  45. XINFERENCE_CHAT_MODEL_UID = "chat"
  46. XINFERENCE_EMBEDDINGS_MODEL_UID = "embedding"
  47. XINFERENCE_RERANK_MODEL_UID = "rerank"
  48. GOOGLE_API_KEY = "abcdefghijklmnopqrstuvwxyz"
  49. HUGGINGFACE_API_KEY = "hf-awuwuwuwuwuwuwuwuwuwuwuwuwuwuwuwuwu"
  50. HUGGINGFACE_TEXT_GEN_ENDPOINT_URL = "a"
  51. HUGGINGFACE_TEXT2TEXT_GEN_ENDPOINT_URL = "b"
  52. HUGGINGFACE_EMBEDDINGS_ENDPOINT_URL = "c"
  53. MOCK_SWITCH = "true"
  54. CODE_MAX_STRING_LENGTH = "80000"
  55. CODE_EXECUTION_ENDPOINT="http://127.0.0.1:8194"
  56. CODE_EXECUTION_API_KEY="dify-sandbox"