-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
101 lines (92 loc) · 2.9 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
[tool.poetry]
name = "sqlmodel-repository"
version = "0.0.1"
description = ""
authors = ["Dmitrij Vinokour <[email protected]>"]
[tool.poetry.dependencies]
python = ">=3.9,<4.0.0"
sqlmodel = ">=0.0.14"
[tool.poetry.dev-dependencies]
[tool.poetry.group.dev.dependencies]
mypy = "^1.7.1"
pytest-asyncio = "^0.23.2"
pytest-cov = "^4.1.0"
aiosqlite = "^0.19.0"
mysqlclient = "^2.2.0"
ruff = "^0.1.7"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
# Minimum supported version
target-version = "py310"
line-length = 88
show-fixes = true
select = [
"F", "E", "W", "C90", "N", "D", "UP", "ANN", "S112", "S110", "BLE", "FBT",
"A", "C4", "DTZ", "EM", "EXE", "INP", "PIE", "PYI", "Q", "RSE", "RET",
"SIM", "TID", "INT", "ARG", "ERA", "PL", "RUF", "B", "I001", "I002"
]
ignore = [
"ARG001", # arg is not accessed
"A003", # class attr shadowing python builtin
"ANN001", # missing function arg annotation
"ANN002", # missing *args annotation
"ANN003", # missing **kwargs annotation
"ANN101", # missing type for self in __init__
"ANN201", # public function return type missing
"ANN202", # private function timereturn type missing (inner function)
"ANN204", # special function return type missing
"B008", # no function calls in function params (need this for DDepends)
"B010", # ignore setattr
"EXE002", # no shbang present
"D100", # missing docstring in module
"D101", # missing docstring in class
"D102", # missing docstring in class method
"D103", # missing docstring in function
"D104", # missing docstring in public package
"D107", # missing docstring in __init__
"E501", # line too long (shouldn't matter with formatter)
"TID252", # relative imports from parent modules are banned
"UP007", # used X | Y for unions
# "UP007",
# "UP037"
"PLR0913", # don't use more than 5 args per function
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Errors which can be fixed
fixable = [
"I001", # isort unsorted imports
"I002", # isort missing imports
]
# 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 = []
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"tests/",
]
[tool.ruff.mccabe]
max-complexity = 15
[tool.mypy]
ignore_missing_imports = true