-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
111 lines (94 loc) · 2.59 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
[tool.poetry]
name = "pyprotostuben"
version = "0.3.3"
description = "Generate Python MyPy stub modules from protobuf files."
authors = ["zerlok <danil.troshnev@gmail.com>"]
readme = "README.md"
license = "MIT"
keywords = [
"python",
"codegen",
"protobuf",
"grpc",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Topic :: Software Development :: Code Generators",
"Typing :: Typed",
]
[tool.poetry.urls]
Homepage = "https://github.com/zerlok/pyprotostuben"
Issues = "https://github.com/zerlok/pyprotostuben/issues"
[tool.poetry.scripts]
protoc-gen-mypy-stub = "pyprotostuben.protoc:gen_mypy_stub"
protoc-gen-brokrpc = "pyprotostuben.protoc:gen_brokrpc"
protoc-gen-echo = "pyprotostuben.protoc:echo"
[tool.poetry.dependencies]
python = "^3.9"
protobuf = "^5.28.3"
[tool.poetry.group.dev.dependencies]
types-protobuf = "^5.28.3.20241030"
mypy = "^1.13.0"
pytest = "^8.3.3"
pytest-cov = "^6.0.0"
pytest-mypy-plugins = "^3.1.2"
ruff = ">=0.7.4,<0.9.0"
grpc-stubs = "^1.53.0.5"
BrokRPC = { version = "^0.2.0", python = ">=3.12,<4.0" }
pyyaml = "^6.0.2"
types-pyyaml = "^6.0.12.20240917"
[tool.poetry.group.examples.dependencies]
BrokRPC = { version = "^0.2.0", extras = ["aiormq"], python = ">=3.12,<4.0" }
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
target-version = "py39"
include = ["src/**/*.py", "tests/**/*.py"]
extend-exclude = ["tests/**/expected_gen/**.py"]
force-exclude = true
line-length = 120
output-format = "pylint"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"ANN", # because we use mypy
"D", # TODO: add docstrings to public code
"FA", # TODO: consider should we use __annotations__
"TD", # no task tracking
"FIX", # TODO: consider enable it against new code on pull requests
"COM812", # because ruff format suggests to skip it
"ISC001", # because ruff format suggests to skip it
"RET505", # clashes with mypy exhaustiveness check
"S101", # allow asserts for tests checks and mypy help
]
[tool.mypy]
files = ["src", "tests"]
strict = true
[[tool.mypy.overrides]]
module = ["tests.integration.cases.*.expected_gen.*"]
ignore_missing_imports = true
ignore_errors = true
[tool.pytest.ini_options]
pythonpath = [
"src",
]
addopts = [
"--cov=src",
"--cov-report=term-missing",
]
testpaths = [
"tests",
]
[tool.coverage.run]
branch = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"@abc.abstractmethod",
"if __name__ == .__main__.:",
"if t.TYPE_CHECKING:",
]
show_missing = true