22name = " natsrpy"
33description = " Nats client library written in rust"
44readme = " README.md"
5- requires-python = " >=3.8 "
5+ requires-python = " >=3.10 "
66license-files = [" LICENSE" ]
77classifiers = [
88 " Programming Language :: Python :: Implementation :: CPython" ,
@@ -12,7 +12,11 @@ classifiers = [
1212dynamic = [" version" ]
1313
1414[dependency-groups ]
15- dev = [" pytest>=9,<10" ]
15+ dev = [
16+ " anyio>=4,<5" ,
17+ " pytest>=9,<10" ,
18+ " pytest-xdist>=3,<4" ,
19+ ]
1620
1721[build-system ]
1822requires = [" maturin>=1.12,<2.0" ]
@@ -23,3 +27,85 @@ bindings = "pyo3"
2327features = [" pyo3/extension-module" ]
2428module-name = " natsrpy._inner"
2529python-source = " python"
30+
31+ [tool .pytest ]
32+ anyio_mode = " auto"
33+
34+ [tool .mypy ]
35+ python_version = " 3.10"
36+ strict = true
37+ ignore_missing_imports = true
38+ allow_subclassing_any = true
39+ allow_untyped_calls = true
40+ packages = [" taskiq_nats" ]
41+ pretty = true
42+ implicit_reexport = true
43+ allow_untyped_decorators = true
44+ warn_return_any = false
45+
46+ [tool .ruff ]
47+ target-version =" py310"
48+ exclude = [" .venv/" ]
49+ line-length = 88
50+
51+ [tool .ruff .lint ]
52+ mccabe = { max-complexity = 10 }
53+ # List of enabled rulsets.
54+ # See https://docs.astral.sh/ruff/rules/ for more information.
55+ select = [
56+ " E" , # Error
57+ " F" , # Pyflakes
58+ " W" , # Pycodestyle
59+ " C90" , # McCabe complexity
60+ " I" , # Isort
61+ " N" , # pep8-naming
62+ " D" , # Pydocstyle
63+ " ANN" , # Pytype annotations
64+ " S" , # Bandit
65+ " B" , # Bugbear
66+ " COM" , # Commas
67+ " C4" , # Comprehensions
68+ " ISC" , # Implicit string concat
69+ " PIE" , # Unnecessary code
70+ " T20" , # Catch prints
71+ " PYI" , # validate pyi files
72+ " Q" , # Checks for quotes
73+ " RSE" , # Checks raise statements
74+ " RET" , # Checks return statements
75+ " SLF" , # Self checks
76+ " SIM" , # Simplificator
77+ " PTH" , # Pathlib checks
78+ " ERA" , # Checks for commented out code
79+ " PL" , # PyLint checks
80+ " RUF" , # Specific to Ruff checks
81+ " UP" , # Pyupgrade
82+ ]
83+ ignore = [
84+ " D105" , # Missing docstring in magic method
85+ " D107" , # Missing docstring in __init__
86+ " D212" , # Multi-line docstring summary should start at the first line
87+ " D401" , # First line should be in imperative mood
88+ " D104" , # Missing docstring in public package
89+ " D100" , # Missing docstring in public module
90+ " ANN401" , # typing.Any are disallowed in `**kwargs
91+ " PLR0913" , # Too many arguments for function call
92+ " D106" , # Missing docstring in public nested class
93+ " PYI021" , # Docstrings should not be included in stubs
94+ ]
95+
96+ [tool .ruff .lint .per-file-ignores ]
97+ "python/tests/*" = [
98+ " S101" , # Use of assert detected
99+ " S301" , # Use of pickle detected
100+ " D103" , # Missing docstring in public function
101+ " SLF001" , # Private member accessed
102+ " S311" , # Standard pseudo-random generators are not suitable for security/cryptographic purposes
103+ " D101" , # Missing docstring in public class
104+ ]
105+
106+ [tool .ruff .lint .pydocstyle ]
107+ convention = " pep257"
108+ ignore-decorators = [" typing.overload" ]
109+
110+ [tool .ruff .lint .pylint ]
111+ allow-magic-value-types = [" int" , " str" , " float" ]
0 commit comments