Skip to content

Add docstrings to all type stubs in python/natsrpy#27

Merged
s3rius merged 2 commits intomasterfrom
copilot/update-docstrings-typestubs
Mar 25, 2026
Merged

Add docstrings to all type stubs in python/natsrpy#27
s3rius merged 2 commits intomasterfrom
copilot/update-docstrings-typestubs

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 25, 2026

Adds comprehensive docstrings to all .pyi type stubs across the python/natsrpy/_natsrpy_rs/ package.

Changes

  • __init__.pyi — Docstrings for Nats, IteratorSubscription, CallbackSubscription and all public methods
  • exceptions.pyi — Docstrings for NatsrpyBaseError, NatsrpySessionError, NatsrpyPublishError
  • js/__init__.pyi — Docstrings for Publication, JetStream, JetStreamMessage (class, all properties, all ack methods)
  • js/stream.pyi — Docstrings for all enums (StorageType, DiscardPolicy, etc.), config/data classes (StreamConfig, StreamInfo, etc.), and Stream
  • js/kv.pyi — Docstrings for KVStatus, KVOperation, KVEntry, iterators, KVConfig, and all KeyValue methods
  • js/object_store.pyi — Docstrings for ObjectStoreConfig, ObjectInfo, ObjectLink, ObjectStore and all methods
  • js/managers.pyi — Docstrings for StreamsManager, KVManager, ConsumersManager, ObjectStoreManager
  • js/consumers.pyi — Docstrings for DeliverPolicy, AckPolicy, ReplayPolicy, PriorityPolicy, both consumer configs, MessagesIterator, PushConsumer, PullConsumer

Fixes to existing docstrings

  • Fixed typos in JetStreamMessage.progress(): "Singnals" → "Signals", "mesasge" → "message"
  • Fixed incorrect param name in JetStreamMessage.nack(): :param duration::param delay:
  • Normalized docstring style to PEP 257 (no leading blank line, consistent punctuation)

Convention

Class docstrings use Attributes: sections for data/config classes. Method docstrings use Sphinx-style :param: / :return: notation, matching the pre-existing style in Stream.direct_get and JetStreamMessage.ack.

@s3rius s3rius marked this pull request as ready for review March 25, 2026 23:44
@s3rius s3rius merged commit 1a2a053 into master Mar 25, 2026
14 of 15 checks passed
@s3rius s3rius deleted the copilot/update-docstrings-typestubs branch March 25, 2026 23:56
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.

2 participants