feat: display human-readable attribute in repr() if present#2010
Merged
JohnVillalovos merged 1 commit intomainfrom May 8, 2022
Merged
feat: display human-readable attribute in repr() if present#2010JohnVillalovos merged 1 commit intomainfrom
repr() if present#2010JohnVillalovos merged 1 commit intomainfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2010 +/- ##
==========================================
+ Coverage 92.51% 92.65% +0.14%
==========================================
Files 78 78
Lines 4944 4944
==========================================
+ Hits 4574 4581 +7
+ Misses 370 363 -7
Flags with carried forward coverage won't be shown. Click here to find out more.
|
JohnVillalovos
approved these changes
May 8, 2022
Member
|
Thanks @nejch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This supersedes #1996 by reusing existing scaffolding we already have for many other objects.
As an aside this should have the added benefit of further decoupling the CLI because we actually use
_repr_attrin the API itself which was not yet the case with_short_print_attrand it was a bit out of place inbase.pyIMO. Now, the CLi simply reuses it.Note: @Psycojoker this replaces
name_with_namespacein your PR withpathbecause we already had it and it'd otherwise be a breaking change on the CLI. Let me know if you want to override that, otherwise we'll usewith_namespacein the next major release which I hope we can have soon with some other features. In any case I think the least confusing option would bepath_with_namespacebecause people cannamethe group and project anything they like, somy-evil-group/my-evil-projectcan be named to display asGitLab.org / GitLabif using names.