Skip to content

detect program name with python -m#1609

Merged
davidism merged 1 commit into
pallets:masterfrom
MLH-Fellowship:program-name-detection
Aug 6, 2020
Merged

detect program name with python -m#1609
davidism merged 1 commit into
pallets:masterfrom
MLH-Fellowship:program-name-detection

Conversation

@gmelodie
Copy link
Copy Markdown
Contributor

Fixes #1603

@davidism davidism force-pushed the program-name-detection branch from 425c0a4 to 3b8e526 Compare August 6, 2020 03:14
@davidism
Copy link
Copy Markdown
Member

davidism commented Aug 6, 2020

Rewrote the docstring, added changelog. Simplified the function a bit more, we only care about getting a representative value for the help text. (Werkzeug needed the exact executable and file paths.) Made the function private (_detect_program_name) for now since I don't really see it being useful as a public API. Simplified the test since it doesn't need to mock relpath, but used pathlib to get the proper path separators on Windows.

@davidism davidism force-pushed the program-name-detection branch from 3b8e526 to 7bfe2c2 Compare August 6, 2020 03:19
@davidism davidism added this to the 8.0.0 milestone Aug 6, 2020
Co-authored-by: Gabriel de Melo Cruz <gabrieldemelocruz@gmail.com>
@davidism davidism force-pushed the program-name-detection branch from 7bfe2c2 to faaec82 Compare August 6, 2020 03:23
@davidism davidism changed the title Program name detection detect program name with python -m Aug 6, 2020
@davidism davidism merged commit 6c1eaba into pallets:master Aug 6, 2020
@davidism davidism deleted the program-name-detection branch August 6, 2020 03:27
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

detection of program name when run with python -m

3 participants