Skip to content

Commit

Permalink
Revert change: getting aliases from command
Browse files Browse the repository at this point in the history
  • Loading branch information
janluke committed May 16, 2022
1 parent 57c5f4d commit 3f2e28f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cloup/_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def add_command(
) -> None:
super().add_command(cmd, name, section, fallback_to_default_section)
name = cast(str, cmd.name) if name is None else name
aliases = getattr(cmd, 'aliases', None) or ()
aliases = getattr(cmd, 'aliases', [])
for alias in aliases:
self.alias2name[alias] = name

Expand Down

0 comments on commit 3f2e28f

Please sign in to comment.