-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathpyproject.toml
146 lines (137 loc) · 3.75 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
[tool.poetry]
name = "fastadmin"
version = "0.2.19"
description = "FastAdmin is an easy-to-use Admin Dashboard App for FastAPI/Flask/Django inspired by Django Admin."
authors = ["Seva D <vsdudakov@gmail.com>"]
license = "MIT"
readme = "README.md"
homepage = "https://github.com/vsdudakov/fastadmin"
repository = "https://github.com/vsdudakov/fastadmin"
keywords = ["fastapi", "admin"]
classifiers = [
"Environment :: Console",
"Framework :: FastAPI",
"Framework :: Django",
"Framework :: Flask",
"Operating System :: OS Independent",
"Topic :: Software Development :: Documentation",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Widget Sets",
]
include = [
"LICENSE",
]
packages = [
{ include = "fastadmin" },
]
[tool.poetry.dependencies]
python = "^3.10"
pyjwt = "^2.6.0"
asgiref = "^3.7.0"
fastapi = { version = "0.*", optional = true }
flask = { version = "2.*", optional = true }
django = { version = "5.*", optional = true }
tortoise-orm = { version = "0.*", optional = true }
sqlalchemy = { version = "2.*", extras = ["asyncio"], optional = true }
pony = { version = "0.*", optional = true }
[tool.poetry.extras]
fastapi = ["fastapi"]
flask = ["flask"]
django = ["django"]
tortoise-orm = ["tortoise-orm"]
sqlalchemy = ["sqlalchemy"]
pony = ["pony"]
[tool.poetry.group.dev.dependencies]
uvicorn = "^0.20.0"
pytest = "^7.4.3"
pytest-cov = "^4.1.0"
pytest-mock = "^3.12.0"
pytest-asyncio = "^0.21.1"
black = "^23.11.0"
mypy = "^1.7.1"
httpx = "^0.23.3"
aioshutil = "^1.2"
htmlmin = "^0.1.12"
bcrypt = "^4.0.1"
ruff = "^0.1.6"
isort = "^5.13.2"
python-dotenv = "^1.0.0"
jinja2 = "^3.1.2"
pytest-xdist = "^3.6.1"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.isort]
line_length = 120
profile = "black"
sections = [
"FUTURE",
"STDLIB",
"THIRDPARTY",
"FIRSTPARTY",
"LOCALPROJECT",
"LOCALFOLDER",
]
default_section = "THIRDPARTY"
known_localproject = ["fastadmin", "tests"]
[tool.black]
line-length = 120
exclude = ".git|.pytest_cache|.venv|.env|venv|env|static"
[tool.ruff]
target-version = "py310"
line-length = 120
select = [
"F", # pyflakes
"E", # pycodestyle
"W", # pycodestyle
"UP", # pyupgrade
"YTT", # flake8-2020
"S", # flake8-bandit
"BLE", # flake8-blind-except
"B", # flake8-bugbear
"A001", # flake8-builtins
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"ISC", # flake8-implicit-str-concat
"G", # flake8-logging-format
"INP", # flake8-no-pep420
"PIE", # flake8-pie
"T20", # flake8-print
"PT", # flake8-pytest-style
"RET501", # flake8-return
"RET502", # flake8-return
"SIM", # flake8-simplify
"PTH", # flake8-use-pathlib
"PGH", # pygrep-hooks
"PLC", # pylint
"PLE", # pylint
"RUF", # ruff-specific
]
fixable = [
"F401", # unused imports
]
ignore = [
"E501", # 'black' handles line length
"F405", # defined from star import
"S101", # impossible logic branches are denoted with 'assert'
"S104", # bind to all interfaces is OK in Docker
"S105",
"S106",
"B008", # function call (e.g. `Depends`) in argument defaults
"PT004", # fixtures that don't return a value must start with an underscore
"SIM108", # use ternary operator ... instead of if-else-block
]
[tool.ruff.isort]
section-order = [
"future",
"standard-library",
"third-party",
"first-party",
"local-folder",
]
[tool.mypy]
python_version = "3.10"
pretty = true
ignore_missing_imports = true
disable_error_code = ["attr-defined", "assignment", "var-annotated", "call-overload"]