Conversation
Co-Authored-By: bmckerry <110857332+bmckerry@users.noreply.github.com>
1232a4c to
2203c57
Compare
| from confluent_kafka.admin import AdminClient, PartitionMetadata | ||
| from confluent_kafka.admin import ( | ||
| AdminClient, | ||
| PartitionMetadata, # type: ignore[attr-defined] |
There was a problem hiding this comment.
confluent_kafka doesn't explicitly export PartitionMetadata for some reason
| self.callback, committable=message.committable, timestamp=message.timestamp | ||
| ), | ||
| headers=message.payload.headers, | ||
| headers=message.payload.headers, # type: ignore[arg-type] |
There was a problem hiding this comment.
message.payload.headers is Arroyo's Headers type, while the arg expects confluent_kafka's HeadersType
There was a problem hiding this comment.
Think we should fix this later? It feels kinda sketchy. In theory, passing a MutableSequence[Tuple[str, bytes]] where a List[Tuple[str, Union[str, bytes, None]]] is expected should be okay at runtime, but not in all cases.
There was a problem hiding this comment.
I'd like to unify on just using the confluent HeadersType in the future
| all_consumers: MutableMapping[str, Consumer | None] = { | ||
| all_consumers: MutableMapping[str, StreamProcessor | None] = { |
There was a problem hiding this comment.
Typing here was always wrong, all_consumers values are StreamProcessors not Consumers
2203c57 to
9efbc5d
Compare
9efbc5d to
f7935c0
Compare
george-sentry
left a comment
There was a problem hiding this comment.
It would be nice to address some of these weird typing workarounds in the future, but nothing obviously wrong stands out to me.
Co-Authored-By: bmckerry <110857332+bmckerry@users.noreply.github.com> --------- Co-authored-by: getsentry-bot <10587625+getsentry-bot@users.noreply.github.com> Co-authored-by: bmckerry <110857332+bmckerry@users.noreply.github.com>
Co-Authored-By: bmckerry 110857332+bmckerry@users.noreply.github.com