forked from milvus-io/pymilvus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
162 lines (144 loc) · 4.05 KB
/
pyproject.toml
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
[build-system]
requires = [
"setuptools >= 67",
"wheel",
"gitpython",
"setuptools_scm[toml]>=6.2",
]
build-backend = "setuptools.build_meta"
[project]
name="pymilvus"
authors = [
{name='Milvus Team', email="milvus-team@zilliz.com"},
]
requires-python = '>=3.7'
description = "Python Sdk for Milvus"
readme = "README.md"
dependencies=[
"grpcio>=1.49.1,<=1.56.0",
"protobuf>=3.20.0",
"environs<=9.5.0",
"ujson>=2.0.0",
"pandas>=1.2.4",
"numpy<1.25.0;python_version<='3.8'",
]
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
]
dynamic = ["version"]
[project.urls]
"repository" = 'https://github.com/milvus-io/pymilvus'
[tool.setuptools_scm]
'local_scheme'= 'no-local-version'
'version_scheme'= 'release-branch-semver'
[tool.black]
line-length = 100
target-version = ['py37']
include = '\.pyi?$'
extend-ignore = ["E203", "E501"]
# 'extend-exclude' excludes files or directories in addition to the defaults
extend-exclude = '''
# A regex preceded with ^/ will apply only to files and directories
# in the root of the project.
(
^/foo.py # exclude a file named foo.py in the root of the project
| .*/grpc_gen/
)
'''
[tool.ruff]
select = [
"E",
"F",
"C90",
"I",
"N",
"B", "C", "G",
"A",
"ANN001",
"S", "T", "W", "ARG", "BLE", "COM", "DJ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"
]
ignore = [
"N818",
"DTZ", # datatime related
"BLE", # blind-except (BLE001)
"SLF", # SLF001 Private member accessed: `_fetch_handler` [E]
"PD003",
"TRY003", # [ruff] TRY003 Avoid specifying long messages outside the exception class [E] TODO
"PLR2004", # Magic value used in comparison, consider replacing 65535 with a constant variable [E] TODO
"TRY301", #[ruff] TRY301 Abstract `raise` to an inner function [E]
"FBT001", #[ruff] FBT001 Boolean positional arg in function definition [E] TODO
"FBT002", # [ruff] FBT002 Boolean default value in function definition [E] TODO
"PLR0911", # Too many return statements (15 > 6) [E]
"G004", # [ruff] G004 Logging statement uses f-string [E]
"S603", # [ruff] S603 `subprocess` call: check for execution of untrusted input [E]
"N802", #[ruff] N802 Function name `OK` should be lowercase [E] TODO
"PD011", # [ruff] PD011 Use `.to_numpy()` instead of `.values` [E]
"COM812",
"FBT003", # [ruff] FBT003 Boolean positional value in function call [E] TODO
"ARG002",
"E501", # black takes care of it
"ARG005", # [ruff] ARG005 Unused lambda argument: `disable` [E]
"TRY400",
"PYI024"
]
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = [
"A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W",
"ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT",
"ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH",
"PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP",
"YTT",
]
unfixable = []
show-fixes = true
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"grpc_gen",
"__pycache__",
"pymilvus/client/stub.py"
]
# Same as Black.
line-length = 100
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Assume Python 3.7
target-version = "py37"
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 18
[tool.ruff.pycodestyle]
max-doc-length = 100
[tool.ruff.pylint]
max-args = 20
max-branches = 15
[tool.ruff.flake8-builtins]
builtins-ignorelist = [
"format",
"next",
"object", # TODO
"id",
"dict", # TODO
"filter",
]