Commit e4c6ddb
committed
observability: PR #19 review followups + CI extras fix
Three changes:
- **CI** — ``uv sync --frozen`` didn't install the ``[otel]`` extras,
so pyright type-checked ``tests/unit/test_observability_otel.py``
against missing ``opentelemetry.*`` symbols and produced 373
false-positive errors. Switched to ``--all-extras`` so every
optional-dependency group is present in CI.
- **OTelObserver.spec_version factory** — ``default_factory=lambda:
_read_spec_version()`` simplified to ``default_factory=_read_spec_version``;
the lambda was a redundant wrapper.
- **test_correlation.py** — replaced ``lambda s: _pre(s)`` with the
bare ``_pre``; the type-ignore came off too.
The other two unnecessary-lambda findings (``detached_subgraphs`` /
``detached_fan_outs`` factories) are kept with an explanatory comment
— pyright strict mode infers ``default_factory=frozenset`` as
``frozenset[Unknown]`` and flags it; the lambda preserves the
``frozenset[str]`` annotation.1 parent b1e1325 commit e4c6ddb
3 files changed
Lines changed: 15 additions & 3 deletions
File tree
- .github/workflows
- src/openarmature/observability/otel
- tests/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
40 | 47 | | |
41 | 48 | | |
42 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
117 | 122 | | |
118 | 123 | | |
119 | 124 | | |
120 | 125 | | |
121 | 126 | | |
122 | 127 | | |
123 | 128 | | |
124 | | - | |
| 129 | + | |
125 | 130 | | |
126 | 131 | | |
127 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| |||
0 commit comments