chore: give every coverage pragma a reason (TS6) - #198
Merged
Merged
Conversation
Test the upstream-mirrored consume/process_message fall-throughs (parser error, no matching filter, suppressed no-handler error, StopConsume, SystemExit) and drop their pragmas; give the rest a same-line reason.
Benchmark gate✅ gate passed
Gated (fails the build): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the repo in line with TS5 and TS6: every
# pragma: no covernow carries its reason on the same line.exclude_alsowas already["if typing.TYPE_CHECKING:"]and no package file is omitted.Of the 23 bare pragmas:
OutboxSubscriber.consume/process_messageare reachable from user code. New tests intests/test_fake.pycover them: a customparser=that raises, a handlerfilter=that matches nothing, a middleware whoseafter_processedsuppresses the no-handler error, and a handler raisingStopConsumeorSystemExit(with aFastStreamapp in context). The "unreachable" comments on those lines were wrong, so they are removed.asyncpgimport fallback, theTestBrokerabstractcreate_publisher_fake_subscriber, the Postgres-unreachable skip in two fixtures, the timeout/failure tails of test polling helpers, a drain-guard stub, and the lease-steal block intest_batched_flush_lease_lost_row_redelivers. I checked that last one: with the pragma removed, coverage on Python 3.11 sometimes missessteal_conn.execute, so it stays. The three-line comment above therow not deletedpoll is folded into its same-line reasons.Local checks:
just install: okjust lint-ci: passjust test-ciagainst Postgres 17 (compose settings): 629 passed, coverage 100% on Python 3.14. It also passes at 100% on Python 3.11.