-
Notifications
You must be signed in to change notification settings - Fork 124
Expand file tree
/
Copy pathpyproject.toml
More file actions
97 lines (88 loc) · 3.46 KB
/
pyproject.toml
File metadata and controls
97 lines (88 loc) · 3.46 KB
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
[project]
name = "openai-chatkit"
version = "1.6.3"
description = "A ChatKit backend SDK."
readme = "README.md"
requires-python = ">=3.10"
dependencies = ["pydantic", "uvicorn", "openai", "openai-agents>=0.3.2", "jinja2>=3.1,<4"]
[dependency-groups]
dev = [
"pytest", "pytest-asyncio", "debugpy", "fastapi", "python-multipart", "psycopg2-binary", "flask", "pyright",
"mypy", "ruff==0.9.2",
"mkdocs", "mkdocs-material", "mkdocstrings[python]", "mkdocs-gen-files"
]
lint = [
"ruff"
]
[tool.ruff]
line-length = 88
preview = true
[tool.ruff.lint]
# To customise ruff rules for your project, use the "extend", "extend-select" and "extend-ignore"
# keys in your project configuration. This can let you inherit most of this configuration.
select = [
"E", "F", "W", "B", "C4", "PIE", "NPY", "PLE", "I",
# grab bag of random things
"DTZ003", "DTZ004",
"G010",
"PLW0120", "PLW0129", "PLW0711", "PLW2101",
"SIM101", "SIM110", "SIM201", "SIM202", "SIM210", "SIM211", "SIM222", "SIM223", "SIM401",
"S506",
"RET501", "RET502", # RET503 is also nice, but there's currently some noise
"RUF006", "RUF007", "RUF008", "RUF013", "RUF016", "RUF017", "RUF200",
"COM818", "COM819",
"PYI016", "PYI018", "PYI025", "PYI030",
"PERF102",
"UP001", "UP003", "UP004", "UP006", "UP007", "UP028", "UP034", "UP045",
"FURB132", "FURB148", "FURB163", "FURB181",
# "ASYNC",
"ASYNC251",
"TID251",
"PT008", "PT012", "PT010", "PT014",
"TC005",
"ANN205", "ANN206",
# "ANN2", # Nice to have, but a lot of existing failures.
# Blocked due to https://github.com/astral-sh/ruff/issues/8322 and to a lesser degree https://github.com/numpy/numpy/issues/7242
# "PLR6201"
]
ignore = [
"B905", # TODO: a useful lint, but need ruff to release my autofix
"B028", # TODO: looks useful, disabled to minimize code change in ruff 0.8.2 upgrade
"E2", # leave it to black
"E3", # leave it to black
"E402", # a people usually know what they're doing
"E501", # line too long. black does a good enough job
"E701", # multiple statements on one line. black does a good enough job
"E711", # comparison to None is commonly used with SQLAlchemy
"E731", # lambda expression assignments. these are nice sometimes
"E741", # variable names like "l". this isn't a huge problem
"B011", # assert false. we don't use python -O
"B903", # nice, but doesn't really change anything, maybe worth it if it gains an autofix
"C408", # we often use dict with keyword args
"C409", # https://github.com/astral-sh/ruff/issues/12912
"C419", # https://github.com/astral-sh/ruff/issues/10838
"C420", # interesting, but i think reads a little worse to most folks. fromkeys predates dict comprehensions
"UP035", # not necessary
"UP038", # slows down code
"NPY002", # useful in theory, but way too many existing hits in practice
"PIE790", # there's nothing wrong with pass
"SIM108", # not convinced of the value
"ASYNC109", # not convinced of the value
"ASYNC230", # this is annoying, SSDs are fast
]
extend-safe-fixes = ["ALL"]
preview = true
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
[tool.pyright]
include = ["."]
exclude = ["**/.venv", "**/.pytest_cache"]
venvPath = "."
venv = ".venv"
pythonVersion = "3.10"
typeCheckingMode = "standard"
[tool.setuptools]
packages = ["chatkit"]
[tool.setuptools.package-data]
"chatkit" = ["py.typed"]