Commit d132255
committed
feat: make TypeID repr output executable by adding .from_string()
Fixes #18
Previously, TypeID.__repr__() returned TypeID('prefix_suffix') which
was not valid Python code since the constructor doesn't accept strings
directly. This made it impossible to copy-paste TypeID representations
from error messages or interactive sessions.
Now __repr__() returns TypeID.from_string('prefix_suffix'), making the
output directly executable and copy-pasteable into Python interpreters.
All existing tests pass with this change.1 parent f66753d commit d132255
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
0 commit comments