-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
78 lines (71 loc) · 1.93 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
# This file contains only the tool configuration for linters. The
# configuration for the component Python projects may be found in the
# pyproject.toml files in subdirectories.
[tool.black]
line-length = 79
target-version = ["py312"]
exclude = '''
/(
\.eggs
| \.git
| \.mypy_cache
| \.tox
| \.venv
| _build
| build
| dist
)/
'''
# Use single-quoted strings so TOML treats the string like a Python r-string
# Multi-line strings are implicitly treated by black as regular expressions
[tool.mypy]
disallow_untyped_defs = true
disallow_incomplete_defs = true
ignore_missing_imports = true
local_partial_types = true
no_implicit_reexport = true
plugins = [
"pydantic.mypy",
"sqlalchemy.ext.mypy.plugin",
]
show_error_codes = true
strict_equality = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_ignores = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
# Use the generic Ruff configuration in ruff.toml and extend it with only
# project-specific settings.
[tool.ruff]
extend = "ruff-shared.toml"
[tool.ruff.lint.extend-per-file-ignores]
"*/src/safir/**" = [
"N818", # Exception is correct in some cases, others are part of API
]
"safir/src/safir/testing/**" = [
"S101", # test support functions are allowed to use assert
]
"safir/tests/data/database/*alembic/**" = [
"INP001", # Alembic files are magical
"D400", # Alembic migrations have their own format
]
[tool.ruff.lint.isort]
detect-same-package = false
known-first-party = ["safir", "tests"]
split-on-trailing-comma = false
[tool.scriv]
categories = [
"Backwards-incompatible changes",
"New features",
"Bug fixes",
"Other changes",
]
entry_title_template = "{{ version }} ({{ date.strftime('%Y-%m-%d') }})"
format = "md"
md_header_level = "2"
new_fragment_template = "file:changelog.d/_template.md.jinja"
skip_fragments = "_template.md.jinja"