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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change list command output from tabulate to rich tables #359
change list command output from tabulate to rich tables #359
Changes from 11 commits
bf581dd
ee1e7ec
129262f
6f9f2a8
1b69202
01dc11d
d500a00
6be65e1
48fa95d
4797cfb
43261c8
cf6986c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that should probably be
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great that you made this code here more readably. line 232 should probably better be
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tried using simple
lst
it doesn't override the list in-place.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does it need to be overwritten in-place? (memory wise it should not make any difference because the current solution creates a temporary list as well and also the required memory hopefully is miniscule...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it does create a temporary list in both case, but in case of
list[:]
it copies the temporary list to the original address. So in a way I am able to edit the list in it's place.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, I had a hands-on look and I now understand why the in-place copy of the list is necessary. That said, declaring
List[Any]
for any of the variables above causesmypy
to give up with these variables altogether, so -- while not optimal either -- I prefer to useList[Optional[int]]
above and add a# type: ignore[attr-defined, index]
comment here...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay thanks for the that. I am new to this static type checks. I'll push the changes