nats-io / nats.py

Python3 client for NATS
https://nats-io.github.io/nats.py/
Apache License 2.0
902 stars 193 forks source link

Fix typing of `JetStreamContext.publish` #605

Closed rijenkii closed 1 month ago

rijenkii commented 2 months ago

Argument headers has type Optional[Dict[Unknown, Unknown]], which makes pyright scream and shout in strict mode:

Type of "publish" is partially unknown
  Type of "publish" is "(subject: str, payload: bytes = b'', timeout: float | None = None, stream: str | None = None, headers: Dict[Unknown, Unknown] | None = None) -> Coroutine[Any, Any, PubAck]"PylancereportUnknownMemberType