You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Minor thing, but it would be nice if in kv.py in the Entry dataclass, we instead used literals here for the operation field:
@dataclassclassEntry:
""" An entry from a KeyValue store in JetStream. """bucket: strkey: strvalue: Optional[bytes]
revision: Optional[int]
delta: Optional[int]
created: Optional[int]
operation: Optional[str]
Proposed change
Minor thing, but it would be nice if in kv.py in the
Entry
dataclass, we instead used literals here for theoperation
field:https://github.com/nats-io/nats.py/blob/main/nats/js/kv.py#L67-L78
I think it would be easier to use if it were:
Use case
It makes development easier if you're using an editor that autocompletes using type hints. It also makes it a little more self-documenting.
Contribution
Sure
The text was updated successfully, but these errors were encountered: