-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
102 lines (89 loc) · 2.4 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
[tool.poetry]
name = "cherry-orm"
version = "1.0.0"
description = "Python asynchronous ORM based on SQLAlchemy and Pydantic."
authors = ["CMHopeSunshine <[email protected]>"]
license = "MIT"
readme = "README.md"
keywords = ["database", "orm", "sqlalchemy", "pydantic", "asyncio"]
packages = [{ include = "cherry" }]
[tool.poetry.dependencies]
python = "^3.9"
pydantic = "^2.7.0"
SQLAlchemy = "^2.0.22"
khemia = "^0.1.1"
aiosqlite = { version = "^0.19.0", optional = true }
asyncmy = { version = "^0.2.8", optional = true }
asyncpg = { version = "^0.28.0", optional = true }
[tool.poetry.extras]
sqlite = ["aiosqlite"]
aiosqlite = ["aiosqlite"]
mysql = ["asyncmy"]
asyncmy = ["asyncmy"]
aiomysql = ["aiomysql"]
postgresql = ["asyncpg"]
asyncpg = ["asyncpg"]
psycopg = ["psycopg"]
all = ["aiosqlite", "asyncmy", "asyncpg"]
[tool.poetry.group.dev.dependencies]
ruff = "^0.1.15"
pre-commit = "^3.7.0"
[tool.poetry.group.test.dependencies]
pytest = "^7.4.0"
pytest-asyncio = "^0.21.1"
[tool.poetry.group.docs.dependencies]
mkdocs-material = "^9.2.7"
jieba = "^0.42.1"
[tool.pytest.ini_options]
asyncio_mode = "strict"
[tool.ruff]
select = [
"E",
"W", # pycodestyle
"F", # pyflakes
"UP", # pyupgrade
"I", # isort
"PYI", # flask8-pyi
"Q", # flake8-quotes
"PTH", # flake8-use-pathlib
"RSE", # flake8-raise
"T20", # flake8-print
"PIE", # flake8-pie
"SIM", # flake8-simplify
"ISC", # flake8-implicit-str-concat
"C4", # flake8-comprehensions
"COM", # flake8-commas
"B", # flake8-bugbear
"ASYNC", # flake8-async
]
ignore = ["E402", "B008", "F403", "F405", "B005", "B905", "F841"]
line-length = 88
target-version = "py39"
ignore-init-module-imports = true
[tool.ruff.isort]
force-sort-within-sections = true
extra-standard-library = ["typing_extensions"]
force-wrap-aliases = true
combine-as-imports = true
order-by-type = false
relative-imports-order = "closest-to-furthest"
section-order = [
"future",
"standard-library",
"first-party",
"local-folder",
"third-party",
]
[tool.ruff.pycodestyle]
ignore-overlong-task-comments = true
max-doc-length = 120
[tool.pyright]
pythonVersion = "3.9"
pythonPlatform = "All"
defineConstant = { PYDANTIC_V2 = true }
typeCheckingMode = "basic"
reportShadowedImports = false
disableBytesTypePromotions = true
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"