-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
77 lines (67 loc) · 2.17 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
[project]
name = "dragonfly-logging-config"
version = "2.0.0"
description = "Shared logging configuration for Dragonfly codebases."
readme = "README.md"
license = {text = "MIT"}
requires-python = ">=3.12,<3.13.dev0"
dependencies = ["structlog>=24.4.0", "fastapi-slim>=0.115.5", "asgi-correlation-id>=4.3.4"]
[project.optional-dependencies]
dev = ["pre-commit==4.0.1", "pyright==1.1.390", "ruff==0.8.2"]
test = ["pytest==8.3.4"]
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.pdm.scripts]
format = "ruff format"
lint = "ruff check --fix"
type-check = "pyright"
pre-commit = "pre-commit run --all-files"
test = "pytest"
all = {composite = ["format", "lint", "type-check", "test"]}
[tool.pyright]
include = ["src/**/*.py"]
venvPath = "."
venv = ".venv"
[tool.ruff]
preview = false
unsafe-fixes = true
target-version = "py312"
line-length = 120
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"CPY001", # (Missing copyright notice at top of file)
"DOC201", # `return` is not documented in docstring
"DOC402", # `yield` is not documented in docstring
"DOC501", # Raised exception `{id}` missing from docstring
"G004", # (Logging statement uses f-string) - Developer UX
"S101", # (Use of `assert` detected) - This should probably be changed
"PLR6301", # (Method `x` could be a function, class method, or static method) - false positives
# Conflicting rules with format (https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules)
"COM812",
"COM819",
"D206",
"D300",
"E111",
"E114",
"E117",
"ISC001",
"ISC002",
"Q000",
"Q001",
"Q002",
"Q003",
"W191",
]
[tool.ruff.lint.extend-per-file-ignores]
"docs/*" = [
"INP001", # (File `docs/*.py` is part of an implicit namespace package. Add an `__init__.py`.) - Docs are not modules
]
"tests/*" = [
"D", # Tests don't need to be documented
"INP001", # (File `tests/*.py` is part of an implicit namespace package. Add an `__init__.py`.) - Tests are not modules
"S101", # (Use of `assert` detected) - Yes, that's the point
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"