forked from QiMington/dify-oapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
120 lines (105 loc) · 2.8 KB
/
pyproject.toml
File metadata and controls
120 lines (105 loc) · 2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
[tool.poetry]
name = "dify-oapi"
version = "0.0.10"
description = "A package for interacting with the Dify Service-API"
authors = ["QiMington <qimington@gmail.com>"]
readme = "README.md"
license = "MIT"
keywords = ["dify", "nlp", "ai", "language-processing"]
homepage = 'https://github.com/QiMington/dify-oapi'
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.urls]
Source = 'https://github.com/QiMington/dify-oapi'
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"site-packages",
"venv",
]
line-length = 120
indent-width = 4
[tool.ruff.lint]
select = [
"A", # flake8-annotations
"B", # flake8-bugbear rules
"F", # pyflakes rules
"N", # name style rules
"I", # isort rules
"UP", # pyupgrade rules
"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
"RUF019", # unnecessary-key-check
"RUF100", # unused-noqa
"RUF101", # redirected-noqa
"S506", # unsafe-yaml-load
"W191", # tab-indentation
"W605", # invalid-escape-sequence
]
ignore = [
"B904", # raise-without-from-inside-except
"N805", # First argument of a method should be named `self`
"N806", # Variable in function should be lowercase
]
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_[a-zA-Z0-9_]*|)$"
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
[tool.ruff.lint.mccabe]
max-complexity = 5
[tool.pylint]
disable = ["all"] # diable all rule first
enable = ["too-many-statements"] # then enable too-many-statements rule
max-statements = 50 # function max statement
############################################################
# Dependency group
############################################################
[tool.poetry.dependencies]
python = ">=3.10"
pydantic = ">=1.10,<3.0.0"
httpx = ">=0.24,<1.0"
[tool.poetry.group.dev]
optional = true
[tool.poetry.group.dev.dependencies]
pytest = "^8.3.3"
pytest-env = "^1.1.5"
[tool.poetry.group.format]
optional = true
[tool.poetry.group.format.dependencies]
pre-commit = "^4.0.1"