-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Detect the program name when python -m
was executed
#424
base: master
Are you sure you want to change the base?
Conversation
@@ -281,6 +282,45 @@ def _PrintResult(component_trace, verbose=False, serialize=None): | |||
Display(output, out=sys.stdout) | |||
|
|||
|
|||
def _GetProgName(name, main=None): |
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.
In the current PR I don't think the main arg is passed anywhere (other than the test). Is a file missing?
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.
It is only passed during testing.
Good idea! Thanks for submitting 👍 |
|
||
Args: | ||
name: Optional. The name of the command as entered at the command line. | ||
main: Optional. This should only be passed during testing. |
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.
See here :)
The new behavior doesn't look quite like what we want:
Instead, we'd prefer the following, right?
|
Closes #76
Old behaviour:
New behaviour: