-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
109 lines (93 loc) · 1.96 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "brag"
requires-python = ">=3.11"
version = "0.0.1"
dependencies = ["fastapi", "openai", "pydantic-settings", "uvicorn", "gunicorn", "qdrant-client[fastembed]", "sentry-sdk", "pugsql", "psycopg2-binary", "faststream[nats]", "async-timeout"]
[project.optional-dependencies]
dev = ["pre-commit", "ruff", "pytest"]
[tool.ruff]
target-version = 'py311'
select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"D", # pydocstyle
"E", # Error
"F", # pyflakes
"I", # isort
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"PGH", # pygrep-hooks
"PTH", # flake8-use-pathlib
"Q", # flake8-quotes
"S", # bandit
"SIM", # flake8-simplify
"TRY", # tryceratops
"UP", # pyupgrade
"W", # Warning
"YTT", # flake8-2020
]
exclude = [
"migrations",
"__pycache__",
"manage.py",
"settings.py",
"env",
".env",
"venv",
".venv",
]
ignore = [
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D106",
"D107",
"D200",
"D205",
"D401",
"E402",
"E501",
"F401",
]
line-length = 120 # Must agree with Black
[tool.ruff.flake8-bugbear]
extend-immutable-calls = [
"chr",
"typer.Argument",
"typer.Option",
]
[tool.ruff.pydocstyle]
convention = "numpy"
[tool.ruff.per-file-ignores]
"tests/*.py" = [
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D106",
"D107",
"S101", # use of "assert"
"S102", # use of "exec"
"S106", # possible hardcoded password.
"PGH001", # use of "eval"
]
"settings/*.py" = [
"N999"
]
[tool.ruff.pep8-naming]
staticmethod-decorators = [
"pydantic.validator",
"pydantic.root_validator",
]
[tool.ruff.isort]
section-order = ["fastapi", "future", "standard-library", "third-party", "first-party", "local-folder"]
[tool.ruff.isort.sections]
fastapi = ["fastapi"]