-
Notifications
You must be signed in to change notification settings - Fork 461
Expand file tree
/
Copy pathpyproject.toml
More file actions
160 lines (134 loc) · 3.84 KB
/
pyproject.toml
File metadata and controls
160 lines (134 loc) · 3.84 KB
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
[project]
name = 'exabgp'
version = '6.0.0'
description = 'BGP swiss army knife'
authors = [
{ name = "Thomas Mangin", email = "thomas.mangin@exa-networks.co.uk" },
]
dynamic = ['license']
requires-python = ">=3.12"
keywords = [
'bgp',
'ddos-protection',
'health-check',
'flowspec',
'bgp-ls',
'mpls',
'vpls',
]
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: System Administrators',
'Intended Audience :: Telecommunications Industry',
'Operating System :: POSIX',
'Operating System :: MacOS :: MacOS X',
'Programming Language :: Python',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: 3.14',
'Topic :: Internet',
]
readme = 'README.md'
dependencies = []
[project.urls]
Repository = 'https://github.com/exa-networks/exabgp'
Homepage = 'https://github.com/exa-networks/exabgp'
Documentation = 'https://github.com/Exa-Networks/exabgp/wiki'
Issues = "https://github.com/exa-networks/exabgp/issues"
[project.scripts]
exabgp = 'exabgp.application.main:main'
exabgp-cli = 'exabgp.application.cli:main'
exabgp-healthcheck = 'exabgp.application.healthcheck:main'
[dependency-groups]
dev = [
"ruff",
"mypy",
"pytest",
"pytest-asyncio",
"pytest-cov",
"coveralls",
"psutil",
"hypothesis>=6.0",
"pytest-benchmark>=4.0",
"pytest-xdist>=3.0",
"pytest-timeout>=2.0",
"mutmut>=3.0",
]
[tool.uv]
environments = ["sys_platform == 'darwin'", "sys_platform == 'linux'"]
[build-system]
requires = ["setuptools", "wheel"]
# include = ["*.txt", "*.rst"]
[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "function"
markers = [
"fuzz: Fuzzing tests using Hypothesis (deselect with '-m \"not fuzz\"')",
"asyncio: Async tests using pytest-asyncio",
"timeout: Test timeout in seconds (requires pytest-timeout plugin)",
]
[tool.ruff]
line-length = 120
exclude = ["dev", "lib/exabgp/vendoring", "build", "site-packages", "src/exabgp/vendoring"]
[tool.ruff.lint]
# Select same critical error codes as flake8 configuration:
# E9: Runtime/syntax errors
# F63: Invalid print statements
# F7: Syntax errors in docstrings and type comments
# F82: Undefined names in __all__
# select = ["E9", "F63", "F7", "F82"]
# Ignore specific rules:
# ERA001: Commented-out code (intentional in this codebase)
ignore = ["ERA001"]
[tool.ruff.lint.flake8-quotes]
inline-quotes = "single"
docstring-quotes = "double"
[tool.ruff.format]
quote-style = "single"
indent-style = "space"
docstring-code-format = true
# E131 continuation line unaligned for hanging indent
# E203 whitespace before ':'
# E222 multiple spaces after operator
# E231 missing whitespace after ','
# E241 multiple spaces after ':'
# E266
# E501 line too long
# W191
# W503
# F401 imported but unused
# F403
# the last , is required otherwise the last error ignore is not applied
[tool.mypy]
# Type annotation project started: 2025-11-12
# Strict mode enabled: 2025-12-17 (no regressions allowed)
# Note: Using 3.12 for mypy to match minimum supported version
python_version = "3.12"
# Strict mode - prevent any type regressions
strict = true
warn_unused_configs = true
warn_return_any = true
warn_redundant_casts = true
warn_unused_ignores = true
# Strict enforcement - no untyped code allowed
disallow_untyped_defs = true
disallow_untyped_calls = true
disallow_incomplete_defs = true
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_decorators = true
check_untyped_defs = true
no_implicit_reexport = true
strict_equality = true
extra_checks = true
# Import handling
follow_imports = "normal"
ignore_missing_imports = true
# Custom stubs for PEP 688 Buffer protocol (mypy doesn't fully support it yet)
mypy_path = "stubs"
# Exclude vendored code
exclude = [
"src/exabgp/vendoring/",
]
# All modules now use global strict settings (2025-12-17)
# No per-module overrides needed