Suggestion: have repr(oid) be `Oid(hex='a1b2c3')` instead of `a1b2c3`
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start by locating the Python Oid implementation and its repr behavior, then inspect nearby tests for Oid string representations. Update the representation so it is a valid Oid(hex='...') expression and confirm the existing representation tests cover the new output.
Written by the indexing model from the issue text.
Description
I suggest to make the repr of Oid objects be:
Oid(hex='a1b2c3')
instead of
a1b2c3
I think that it's better if repr returns a valid python expression. It's clearer what the object is, and it makes it easier to reconstruct it.
I can probably submit a pull request if this is approved.
Thanks!
Noam
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 408
- Avg merge
- 2d 57m
- Merged PRs (30d)
- 7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from libgit2/pygit2
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100