Skip to content

chore: give every coverage pragma a reason (TS6, TS5) - #261

Merged
lesnik512 merged 1 commit into
mainfrom
chore/pragma-reasons
Sep 27, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
chore/pragma-reasons

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Brings coverage exclusions in line with TS5 and TS6.

TS5: dropped "except ImportError:" from [tool.coverage.report] exclude_also. No except ImportError: block exists in the repo any more (optional-dependency probes live in import_checker.py), so the entry excluded nothing.

TS6 counts: 1 tested / 0 deleted / 2 reasoned.

  • Tested: PyroscopeSpanProcessor.force_flush. TracerProvider.force_flush() calls every processor's force_flush, and at the declared opentelemetry-sdk>=1.28 floor the base SpanProcessor.force_flush returns None, which fails the provider's flush. The new test asserts the provider flush succeeds with the processor attached. The current SDK's base also returns True, so the test only catches a regression at the floor.
  • Reasoned: the no-op tracer_injection else: branch in logging_instrument.py. It runs only when opentelemetry is absent, and the test env installs all extras.
  • Reasoned: transient_app in test_litestar_bootstrap.py. It is only a weakref target and is never called.

Local checks: just install, just lint-ci pass; just test-ci 332 passed, 100 % coverage.

@lesnik512
lesnik512 merged commit 9009cad into main Sep 27, 2026
37 checks passed
@lesnik512
lesnik512 deleted the chore/pragma-reasons branch September 27, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant