-
-
Save tsibley/72fc19d5028d4b8595797bb5567958bd to your computer and use it in GitHub Desktop.
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
| diff --git a/augur/__init__.py b/augur/__init__.py | |
| index 31ee6826..a69dcf44 100644 | |
| --- a/augur/__init__.py | |
| +++ b/augur/__init__.py | |
| @@ -142,4 +142,9 @@ def command_name(command): | |
| package = command.__package__ | |
| module_name = command.__name__ | |
| + # If the command module is also a package, e.g. augur/x/__init__.py instead | |
| + # of augur/x.py, then use the parent package. | |
| + if package == module_name: | |
| + package = package.rsplit(".", 1)[0] | |
| + | |
| return remove_prefix(package, module_name).lstrip(".").replace("_", "-") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment