Skip to content

Commit a4fff71

Browse files
Add tombi formatting/linting for TOML files (#193)
Signed-off-by: Stefan VanBuren <svanburen@buf.build>
1 parent 863d4d1 commit a4fff71

6 files changed

Lines changed: 316 additions & 281 deletions

File tree

connectrpc-otel/pyproject.toml

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -2,82 +2,82 @@
22
name = "connectrpc-otel"
33
version = "0.1.0"
44
description = "OpenTelemetry instrumentation for connectrpc"
5-
maintainers = [
6-
{ name = "Anuraag Agrawal", email = "anuraaga@gmail.com" },
7-
{ name = "Spencer Nelson", email = "spencer@firetiger.com" },
8-
{ name = "Stefan VanBuren", email = "svanburen@buf.build" },
9-
{ name = "Yasushi Itoh", email = "i2y.may.roku@gmail.com" },
10-
]
11-
requires-python = ">= 3.10"
125
readme = "README.md"
6+
requires-python = ">= 3.10"
137
license = "Apache-2.0"
148
license-files = ["LICENSE"]
9+
maintainers = [
10+
{ name = "Anuraag Agrawal", email = "anuraaga@gmail.com" },
11+
{ name = "Spencer Nelson", email = "spencer@firetiger.com" },
12+
{ name = "Stefan VanBuren", email = "svanburen@buf.build" },
13+
{ name = "Yasushi Itoh", email = "i2y.may.roku@gmail.com" },
14+
]
1515
keywords = [
16-
"opentelemetry",
17-
"otel",
18-
"connectrpc",
19-
"connect-python",
20-
"middleware",
21-
"tracing",
22-
"observability",
16+
"connect-python",
17+
"connectrpc",
18+
"middleware",
19+
"observability",
20+
"opentelemetry",
21+
"otel",
22+
"tracing",
2323
]
2424
classifiers = [
25-
"Development Status :: 4 - Beta",
26-
"Environment :: Console",
27-
"Intended Audience :: Developers",
28-
"Operating System :: OS Independent",
29-
"Programming Language :: Python :: 3",
30-
"Programming Language :: Python :: 3 :: Only",
31-
"Programming Language :: Python :: 3.10",
32-
"Programming Language :: Python :: 3.11",
33-
"Programming Language :: Python :: 3.12",
34-
"Programming Language :: Python :: 3.13",
35-
"Programming Language :: Python :: 3.14",
36-
"Topic :: System :: Networking",
25+
"Development Status :: 4 - Beta",
26+
"Environment :: Console",
27+
"Intended Audience :: Developers",
28+
"Operating System :: OS Independent",
29+
"Programming Language :: Python :: 3",
30+
"Programming Language :: Python :: 3 :: Only",
31+
"Programming Language :: Python :: 3.10",
32+
"Programming Language :: Python :: 3.11",
33+
"Programming Language :: Python :: 3.12",
34+
"Programming Language :: Python :: 3.13",
35+
"Programming Language :: Python :: 3.14",
36+
"Topic :: System :: Networking",
3737
]
3838
dependencies = [
39-
"opentelemetry-api>=1.39.1",
40-
# We do not want to prevent users from updating OTel when connectrpc isn't depending on
41-
# the latest. This does introduce a possibility of incompatibilities, but there is no
42-
# alternative, and in practice, the APIs we use have been stable for a long time.
43-
"opentelemetry-instrumentation>=0.60b1",
39+
"opentelemetry-api>=1.39.1",
40+
# We do not want to prevent users from updating OTel when connectrpc isn't depending on
41+
# the latest. This does introduce a possibility of incompatibilities, but there is no
42+
# alternative, and in practice, the APIs we use have been stable for a long time.
43+
"opentelemetry-instrumentation>=0.60b1",
4444
]
4545

46+
[project.urls]
47+
Homepage = "https://github.com/connectrpc/connect-python"
48+
Issues = "https://github.com/connectrpc/connect-python/issues"
49+
Repository = "https://github.com/connectrpc/connect-python"
50+
51+
[project.entry-points.opentelemetry_instrumentor]
52+
connectrpc = "connectrpc_otel:ConnectInstrumentor"
53+
4654
[dependency-groups]
4755
dev = [
48-
# auto-instrumentation shouldn't include a dependency on the library being instrumented
49-
# so it can be packaged in auto-instrumentation distros for general use.
50-
#
51-
# This library also supports manually initializing the interceptor.
52-
# For users that manually instrument by initializing the interceptor, it is easier to
53-
# have a real dependency to avoid any possible version conflicts. But for Python,
54-
# the ecosystem vastly favors auto-instrumentation, and it is easier to add than remove
55-
# a transitive dependency, so we go ahead and leave it out.
56-
"connectrpc>=0.8.0",
56+
# auto-instrumentation shouldn't include a dependency on the library being instrumented
57+
# so it can be packaged in auto-instrumentation distros for general use.
58+
#
59+
# This library also supports manually initializing the interceptor.
60+
# For users that manually instrument by initializing the interceptor, it is easier to
61+
# have a real dependency to avoid any possible version conflicts. But for Python,
62+
# the ecosystem vastly favors auto-instrumentation, and it is easier to add than remove
63+
# a transitive dependency, so we go ahead and leave it out.
64+
"connectrpc>=0.8.0",
5765

58-
"opentelemetry-sdk==1.40.0",
59-
"opentelemetry-instrumentation-asgi==0.61b0",
60-
"opentelemetry-instrumentation-wsgi==0.61b0",
66+
"opentelemetry-instrumentation-asgi==0.61b0",
67+
"opentelemetry-instrumentation-wsgi==0.61b0",
68+
"opentelemetry-sdk==1.40.0",
6169

62-
"connect-python-example",
63-
"pytest",
70+
"connect-python-example",
71+
"pytest",
6472
]
6573

66-
[project.entry-points.opentelemetry_instrumentor]
67-
connectrpc = "connectrpc_otel:ConnectInstrumentor"
68-
69-
[project.urls]
70-
Homepage = "https://github.com/connectrpc/connect-python"
71-
Repository = "https://github.com/connectrpc/connect-python"
72-
Issues = "https://github.com/connectrpc/connect-python/issues"
73-
7474
[build-system]
7575
requires = ["uv_build>=0.11.0,<0.12.0"]
7676
build-backend = "uv_build"
7777

78+
[tool.ruff]
79+
extend = "../pyproject.toml"
80+
7881
[tool.uv.build-backend]
7982
module-name = "connectrpc_otel"
8083
module-root = ""
81-
82-
[tool.ruff]
83-
extend = "../pyproject.toml"

justfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,18 @@ BUF_VERSION := "v1.57.0"
55
[private]
66
@default: check
77

8-
# Format Python files
8+
# Format Python files and TOML files
99
format:
1010
uv run ruff check --fix --unsafe-fixes --exit-zero .
1111
uv run ruff format .
12+
uv run tombi format
1213

13-
# Lint Python files
14+
# Lint Python and TOML files
1415
lint:
1516
uv run ruff format --check .
1617
uv run ruff check .
18+
uv run tombi format --check
19+
uv run tombi lint
1720

1821
# Typecheck Python files
1922
typecheck:

protoc-gen-connect-python/pyproject.toml

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,51 @@
22
name = "protoc-gen-connectrpc"
33
version = "0.9.0"
44
description = "Code generator for connect-python"
5-
maintainers = [
6-
{ name = "Anuraag Agrawal", email = "anuraaga@gmail.com" },
7-
{ name = "Spencer Nelson", email = "spencer@firetiger.com" },
8-
{ name = "Stefan VanBuren", email = "svanburen@buf.build" },
9-
{ name = "Yasushi Itoh", email = "i2y.may.roku@gmail.com" },
10-
]
11-
requires-python = ">= 3.10"
125
readme = "README.md"
6+
requires-python = ">= 3.10"
137
license = "Apache-2.0"
148
license-files = ["LICENSE"]
9+
maintainers = [
10+
{ name = "Anuraag Agrawal", email = "anuraaga@gmail.com" },
11+
{ name = "Spencer Nelson", email = "spencer@firetiger.com" },
12+
{ name = "Stefan VanBuren", email = "svanburen@buf.build" },
13+
{ name = "Yasushi Itoh", email = "i2y.may.roku@gmail.com" },
14+
]
1515
keywords = [
16-
"protoc",
17-
"protobuf",
18-
"protocol-buffers",
19-
"code-generation",
20-
"connect",
21-
"connectrpc",
22-
"connect-protocol",
23-
"connect-rpc",
24-
"rpc",
25-
"compiler",
26-
"plugin",
16+
"code-generation",
17+
"compiler",
18+
"connect",
19+
"connect-protocol",
20+
"connect-rpc",
21+
"connectrpc",
22+
"plugin",
23+
"protobuf",
24+
"protoc",
25+
"protocol-buffers",
26+
"rpc",
2727
]
2828
classifiers = [
29-
"Development Status :: 4 - Beta",
30-
"Environment :: Console",
31-
"Intended Audience :: Developers",
32-
"Operating System :: OS Independent",
33-
"Programming Language :: Go",
34-
"Programming Language :: Python :: 3",
35-
"Programming Language :: Python :: 3 :: Only",
36-
"Programming Language :: Python :: 3.10",
37-
"Programming Language :: Python :: 3.11",
38-
"Programming Language :: Python :: 3.12",
39-
"Programming Language :: Python :: 3.13",
40-
"Programming Language :: Python :: 3.14",
41-
"Topic :: Software Development :: Code Generators",
42-
"Topic :: Software Development :: Compilers",
43-
"Topic :: System :: Networking",
29+
"Development Status :: 4 - Beta",
30+
"Environment :: Console",
31+
"Intended Audience :: Developers",
32+
"Operating System :: OS Independent",
33+
"Programming Language :: Go",
34+
"Programming Language :: Python :: 3",
35+
"Programming Language :: Python :: 3 :: Only",
36+
"Programming Language :: Python :: 3.10",
37+
"Programming Language :: Python :: 3.11",
38+
"Programming Language :: Python :: 3.12",
39+
"Programming Language :: Python :: 3.13",
40+
"Programming Language :: Python :: 3.14",
41+
"Topic :: Software Development :: Code Generators",
42+
"Topic :: Software Development :: Compilers",
43+
"Topic :: System :: Networking",
4444
]
4545

4646
[project.urls]
4747
Homepage = "https://github.com/connectrpc/connect-python"
48-
Repository = "https://github.com/connectrpc/connect-python"
4948
Issues = "https://github.com/connectrpc/connect-python/issues"
49+
Repository = "https://github.com/connectrpc/connect-python"
5050

5151
[dependency-groups]
5252
dev = ["wheel"]

0 commit comments

Comments
 (0)