forked from roboflow/roboflow-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
120 lines (109 loc) · 2.07 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
[build-system]
requires = ["setuptools>=57", "wheel"]
build-backend = "setuptools.build_meta"
[tool.bandit]
target = ["test", "roboflow"]
tests = ["B201", "B301"]
[tool.ruff]
target-version = "py38"
line-length = 120
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"A",
"ANN",
"ARG",
"B",
"BLE",
"C",
"COM",
"D",
"DTZ",
"EM",
"ERA",
"FBT",
"FIX",
"FLY",
"FURB",
"ISC",
"N",
"PERF",
"PIE",
"PLR",
"PLW",
"PT",
"PTH",
"RET",
"RUF",
"S",
"SIM",
"SLF",
"T",
"TD",
"TRY",
]
# 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",
"yarn-error.log",
"yarn.lock",
"docs",
"tests/manual/debugme.py", # file is intentionally broken
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"__init__.py" = [
"E402", # Module level import not at top of file
"F401", # Imported but unused
]
[tool.ruff.lint.pyupgrade]
# Preserve types, even if a file imports `from __future__ import annotations`.
keep-runtime-typing = true
[tool.ruff.lint.flake8-tidy-imports]
banned-module-level-imports = [
"cv2",
"matplotlib",
"numpy",
]
[tool.mypy]
python_version = "3.8"
exclude = ["^build/"]
[[tool.mypy.overrides]]
module = [
"_datetime.*",
"filetype.*",
# IPython is an optional dependency
"IPython.display.*",
# ipywidgets is an optional dependency
"ipywidgets.*",
# matplotlib typing is not available for Python 3.8
# remove this when we stop supporting Python 3.8
"matplotlib.*",
"requests_toolbelt.*",
"torch.*",
"ultralytics.*",
]
ignore_missing_imports = true