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