2024-02-06 13:21:13 +08:00
|
|
|
[project]
|
|
|
|
requires-python = ">=3.10"
|
|
|
|
|
|
|
|
[tool.ruff]
|
|
|
|
exclude = [
|
|
|
|
]
|
|
|
|
line-length = 120
|
|
|
|
|
|
|
|
[tool.ruff.lint]
|
|
|
|
ignore-init-module-imports = true
|
|
|
|
select = [
|
2024-05-20 16:34:13 +08:00
|
|
|
"B", # flake8-bugbear rules
|
2024-02-08 14:11:10 +08:00
|
|
|
"F", # pyflakes rules
|
2024-05-20 16:34:13 +08:00
|
|
|
"I", # isort rules
|
2024-02-09 15:21:33 +08:00
|
|
|
"UP", # pyupgrade rules
|
2024-06-05 14:05:15 +08:00
|
|
|
"E101", # mixed-spaces-and-tabs
|
|
|
|
"E111", # indentation-with-invalid-multiple
|
|
|
|
"E112", # no-indented-block
|
|
|
|
"E113", # unexpected-indentation
|
|
|
|
"E115", # no-indented-block-comment
|
|
|
|
"E116", # unexpected-indentation-comment
|
|
|
|
"E117", # over-indented
|
2024-05-19 18:30:45 +08:00
|
|
|
"RUF019", # unnecessary-key-check
|
2024-06-05 14:05:15 +08:00
|
|
|
"RUF100", # unused-noqa
|
|
|
|
"RUF101", # redirected-noqa
|
2024-05-24 12:08:12 +08:00
|
|
|
"S506", # unsafe-yaml-load
|
2024-06-05 14:05:15 +08:00
|
|
|
"W191", # tab-indentation
|
2024-06-02 10:02:37 +08:00
|
|
|
"W605", # invalid-escape-sequence
|
2024-02-08 14:11:10 +08:00
|
|
|
]
|
|
|
|
ignore = [
|
|
|
|
"F403", # undefined-local-with-import-star
|
|
|
|
"F405", # undefined-local-with-import-star-usage
|
|
|
|
"F821", # undefined-name
|
|
|
|
"F841", # unused-variable
|
2024-02-09 15:21:33 +08:00
|
|
|
"UP007", # non-pep604-annotation
|
|
|
|
"UP032", # f-string
|
2024-05-20 16:34:13 +08:00
|
|
|
"B005", # strip-with-multi-characters
|
|
|
|
"B006", # mutable-argument-default
|
|
|
|
"B007", # unused-loop-control-variable
|
|
|
|
"B026", # star-arg-unpacking-after-keyword-arg
|
|
|
|
"B904", # raise-without-from-inside-except
|
|
|
|
"B905", # zip-without-explicit-strict
|
2024-02-06 13:21:13 +08:00
|
|
|
]
|
2024-04-18 13:43:15 +08:00
|
|
|
|
2024-04-18 20:24:05 +08:00
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
|
|
"app.py" = [
|
|
|
|
"F401", # unused-import
|
|
|
|
"F811", # redefined-while-unused
|
|
|
|
]
|
|
|
|
"__init__.py" = [
|
|
|
|
"F401", # unused-import
|
|
|
|
"F811", # redefined-while-unused
|
|
|
|
]
|
|
|
|
"tests/*" = [
|
|
|
|
"F401", # unused-import
|
|
|
|
"F811", # redefined-while-unused
|
|
|
|
]
|
|
|
|
|
2024-04-18 13:43:15 +08:00
|
|
|
|
|
|
|
[tool.pytest_env]
|
|
|
|
OPENAI_API_KEY = "sk-IamNotARealKeyJustForMockTestKawaiiiiiiiiii"
|
|
|
|
AZURE_OPENAI_API_BASE = "https://difyai-openai.openai.azure.com"
|
|
|
|
AZURE_OPENAI_API_KEY = "xxxxb1707exxxxxxxxxxaaxxxxxf94"
|
|
|
|
ANTHROPIC_API_KEY = "sk-ant-api11-IamNotARealKeyJustForMockTestKawaiiiiiiiiii-NotBaka-ASkksz"
|
|
|
|
CHATGLM_API_BASE = "http://a.abc.com:11451"
|
|
|
|
XINFERENCE_SERVER_URL = "http://a.abc.com:11451"
|
|
|
|
XINFERENCE_GENERATION_MODEL_UID = "generate"
|
|
|
|
XINFERENCE_CHAT_MODEL_UID = "chat"
|
|
|
|
XINFERENCE_EMBEDDINGS_MODEL_UID = "embedding"
|
|
|
|
XINFERENCE_RERANK_MODEL_UID = "rerank"
|
|
|
|
GOOGLE_API_KEY = "abcdefghijklmnopqrstuvwxyz"
|
|
|
|
HUGGINGFACE_API_KEY = "hf-awuwuwuwuwuwuwuwuwuwuwuwuwuwuwuwuwu"
|
|
|
|
HUGGINGFACE_TEXT_GEN_ENDPOINT_URL = "a"
|
|
|
|
HUGGINGFACE_TEXT2TEXT_GEN_ENDPOINT_URL = "b"
|
|
|
|
HUGGINGFACE_EMBEDDINGS_ENDPOINT_URL = "c"
|
|
|
|
MOCK_SWITCH = "true"
|
2024-05-03 08:54:40 +08:00
|
|
|
CODE_MAX_STRING_LENGTH = "80000"
|
|
|
|
CODE_EXECUTION_ENDPOINT="http://127.0.0.1:8194"
|
|
|
|
CODE_EXECUTION_API_KEY="dify-sandbox"
|