-
-
Notifications
You must be signed in to change notification settings - Fork 171
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
Enhance readability of the info cmd, and print status by default. #227
Conversation
doit/cmd_info.py
Outdated
@@ -12,7 +12,7 @@ | |||
'short': 's', | |||
'long': 'status', | |||
'type': bool, | |||
'default': False, | |||
'default': True, |
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 am OK with changing the default. But boolean values must have default value False
, otherwise it is not possible to set their value to False
. In this case I think better add another parameter like hide-status
.
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.
Good point. Maybe no-status
which seems a more widely used convention ?
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.
ok. no-status
'long': 'status', | ||
opt_hide_execute_status = { | ||
'name': 'hide_execute_status', | ||
# 'short': 's', |
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.
Do you want a short flag ?
The test failures are weird, it concern the strace command and I don't have the issue locally. |
@@ -27,7 +27,7 @@ def flat_generator(gen, gen_doc=''): | |||
if inspect.isgenerator(item): | |||
item_doc = item.gi_code.co_consts[0] | |||
for value, value_doc in flat_generator(item, item_doc): | |||
yield value, value_doc | |||
yield value, value_doc or gen_doc |
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.
what is this change for? seems unrelated...
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.
ok. The commit message says why you added it.
This change does not break any test, but you also did not add any test... and I am not sure this is always the desired behaviour. I am reverting this change for now.
So please create another issue to discuss what should be the expected behaviour. Can you show an example of why you make this change?
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 think it is for subtasks, in order to have the docstring of the parent generator. I can check later to give an example.
merged. thanks. |
A few changes to make
doit info
nicer (imho):task_dep
etc.)Before:
After: