Skip to content

fix: narrow LogRecord.exc_info by truthiness for ty 0.0.89 - #105

Merged
lesnik512 merged 1 commit into
mainfrom
fix/ty-0.0.89-exc-info
Oct 16, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
fix/ty-0.0.89-exc-info

Conversation

@lesnik512

Copy link
Copy Markdown
Member

The scheduled dep-check lint job failed on ty 0.0.89 (run 38892705113):

error[not-subscriptable]: Cannot subscript object of type `Literal[False]` with no `__getitem__` method
    --> tests/test_kafka_committer.py:1516:23

ty 0.0.89 ships a newer typeshed where LogRecord.exc_info also includes Literal[False]. On 0.0.88 it was tuple[...] | tuple[None, None, None] | None. The is not None check no longer rules out False, so the subscript on the next line fails.

assert exc_info removes both None and False. At runtime the value is a 3-tuple and always truthy, so the test checks the same thing as before.

Checked locally with ty 0.0.89: just lint-ci passes, and the unit tests pass (218). I didn't run the integration tests because there's no Kafka broker on this machine; CI covers them.

@lesnik512
lesnik512 merged commit e9b4715 into main Oct 16, 2026
11 checks passed
@lesnik512
lesnik512 deleted the fix/ty-0.0.89-exc-info branch October 16, 2026 15:08
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