textual
textual copied to clipboard
Change StringKey to simple strings. Fix ordering issue
Please review the following checklist.
- [X] Docstrings on all new or modified functions / classes
- [?] Updated documentation
- [n/a] Updated CHANGELOG.md (where appropriate)
DataTable's StringKey was recently exposed, meaning users could try to compare them. Unfortunately, this was causing an a comparison between str and None: StringKey("a string") < StringKey()
. To solve the problem and simplify the class, either a StringKey value is the supplied string or the string representation of its id()
.
Test included, if you want to see it break before applying this change.