cloudevents / cloudevents/sdk-python

Improve the docstring of abstract.CloudEvent

Open
#247 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
342
Forks
65
PR merge metrics
No merged PRs in 30d

Description

The getitem of this class goes on to describe that:

https://github.com/cloudevents/sdk-python/blob/c5645d8fcf03432639727b9a7f6508c3059a1673/cloudevents/abstract/event.py#L99-L100

providing a reason and perhaps a reference to an example would help developers understand why event.get() is discouraged by this helper method.

For instance, there is confusion in how the private _attributes data should be accessed expressed in https://github.com/cloudevents/sdk-python/issues/246.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open cloudevents/abstract/event.py around lines 99-100 and inspect the getitem docstring. Read issue #246 for the reported confusion about accessing private _attributes data. Done means the docstring explains why event.get() is discouraged and includes a useful example or reference.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.