Skip to content

Commit c1c4dff

Browse files
Added in a repr for alises to improve documentation.
1 parent 6e9492e commit c1c4dff

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pacai/util/alias.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ def __init__(self,
4040
Alias._alias_map[short] = long
4141
Alias._all_aliases.append(self)
4242

43+
def __repr__(self) -> str:
44+
return f"('{self.short}' -> '{self.long}')"
45+
4346
def lookup(short: str, default: str | None = None) -> str:
4447
"""
4548
Lookup the long name for an alias.

0 commit comments

Comments
 (0)