-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
112 lines (93 loc) · 2.97 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
110
111
112
[project]
name = "websockets-notification-py"
version = "0.0.1"
requires-python = ">=3.12"
dependencies = [
"websockets",
"aio-pika",
"pydantic",
"pydantic-settings",
"httpx",
"pyjwt[crypto]",
"sentry-sdk",
]
[project.optional-dependencies]
dev = [
"ipython",
"pytest-deadfixtures",
"pytest-mock",
"pytest-randomly",
"pytest-freezer",
"pytest-asyncio",
"respx",
"dotenv-linter",
"ruff",
"mypy",
]
[tool.ruff]
line-length = 160
src = ["src"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"ANN101", # Missing type annotation for self in method
"ANN102", # missing type annotation for `cls` in classmethod
"ANN401", # dynamically typed expressions (typing.Any) are disallowed in `{}`
"COM812", # Trailing comma missing
"D100", # missing docstring in public module
"D101", # missing docstring in public class
"D102", # missing docstring in public method
"D103", # missing docstring in public function
"D104", # missing docstring in public package
"D105", # missing docstring in magic method
"D106", # missing docstring in public nested class
"D107", # missing docstring in `__init__`
"D203", # one blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"EM101", # exception must not use a string literal, assign to variable first
"EM102", # expection must not use an f-string literal, assign to variable first
"INP001", # file `%filename%` is part of an implicit namespace package. Add an `__init__.py`
"ISC001", # implicitly concatenated string literals on one line
"N818", # exception name `{}` should be named with an Error suffix
"PT001", # use `@pytest.fixture()` over `@pytest.fixture`
"TRY003", # avoid specifying long messages outside the exception class
]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.per-file-ignores]
"**/tests/*" = [
"ANN", # flake8-annotations
"ARG001", # Unused function argument
"PLR0913", # Too many arguments in function definition
"PLR2004", # Magic value used in comparison, consider replacing `%value%` with a constant variable
"S101", # Use of `assert` detected
]
"**/fixtures.py" = [
"ANN", # flake8-annotations
]
[tool.ruff.lint.isort]
extra-standard-library = ["pytest"]
[tool.pytest.ini_options]
pythonpath = ["src"]
testpaths = ["src"]
python_files = ["test*.py"]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"rabbitmq: marks test as required rabbitmq conneciton",
]
asyncio_mode = "auto"
[tool.mypy]
python_version = "3.12"
mypy_path = "src"
files = "src"
namespace_packages = true
explicit_package_bases = true
warn_no_return = true
warn_unused_configs = true
warn_unused_ignores = true
warn_redundant_casts = true
no_implicit_optional = true
no_implicit_reexport = true
strict_equality = true
warn_unreachable = true
disallow_untyped_calls = true