-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
94 lines (82 loc) · 3.43 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
[project]
name = "dynconf-nats"
description = "dynconf-nats: A simple dynconf impl over NATS KeyValue"
readme = "README.md"
authors = [
{ name = "Artem Ukolov", email = "[email protected]" },
]
keywords = ["nats-py", "fastapi", "dynconf"]
requires-python = ">=3.12"
[tool.mypy]
files = ["app"]
strict = true
python_version = "3.12"
ignore_missing_imports = true
install_types = true
non_interactive = true
plugins = ["pydantic.mypy"]
# from https://blog.wolt.com/engineering/2021/09/30/professional-grade-mypy-configuration/
disallow_untyped_defs = true
no_implicit_optional = true
check_untyped_defs = true
warn_return_any = true
show_error_codes = true
warn_unused_ignores = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
disallow_any_unimported = false
[tool.ruff]
fix = true
line-length = 88
target-version = "py312"
include = [
"app/**/*.py",
"app/**/*.pyi",
"pyproject.toml",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors https://docs.astral.sh/ruff/rules/#error-e
"W", # pycodestyle warnings https://docs.astral.sh/ruff/rules/#warning-w
"C90", # mccabe https://docs.astral.sh/ruff/rules/#mccabe-c90
"N", # pep8-naming https://docs.astral.sh/ruff/rules/#pep8-naming-n
"D", # pydocstyle https://docs.astral.sh/ruff/rules/#pydocstyle-d
"I", # isort https://docs.astral.sh/ruff/rules/#isort-i
"F", # pyflakes https://docs.astral.sh/ruff/rules/#pyflakes-f
"ASYNC", # flake8-async https://docs.astral.sh/ruff/rules/#flake8-async-async
"C4", # flake8-comprehensions https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
"B", # flake8-bugbear https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
"Q", # flake8-quotes https://docs.astral.sh/ruff/rules/#flake8-quotes-q
"T20", # flake8-print https://docs.astral.sh/ruff/rules/#flake8-print-t20
"SIM", # flake8-simplify https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
"PT", # flake8-pytest-style https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt
"PTH", # flake8-use-pathlib https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
"TCH", # flake8-type-checking https://docs.astral.sh/ruff/rules/#flake8-type-checking-tch
"RUF", # Ruff-specific rules https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
"PERF", # Perflint https://docs.astral.sh/ruff/rules/#perflint-perf
"UP", # pyupgrade https://docs.astral.sh/ruff/rules/#pyupgrade-up
]
ignore = [
"ASYNC109", # own timeout implementation
"E501", # line too long, handled by formatter later
"C901", # too complex
# todo pep8-naming
"N817", # CamelCase `*` imported as acronym `*`
"N815", # Variable `*` in class scope should not be mixedCase
"N803", # Argument name `expandMessageExamples` should be lowercase
# todo pydocstyle
"D100", # missing docstring in public module
"D101",
"D102",
"D103",
"D104", # missing docstring in public package
"D105", # missing docstring in magic methods
"D106", # missing docstring in public nested class
"D107", # missing docstring in __init__
]
[tool.ruff.lint.isort]
case-sensitive = true
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint.pydocstyle]
convention = "google"