Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix color printing for Python 3.11 (#236)
Fix for Python 3.11 (not sure what changed, but there were some str and format-related changes in the enum module). Since 3.11 using f"{Color.foo}" prints "Color.foo" instead of inserting Color.foo.value . One solution is to do that everywhere. Here we opt for a minimally invasive fix and add __str__ to the info.Color enum. Also remove the str mixin, so replace class Color(str, Enum) by class Color(Enum) Not sure what the str mixin was supposed to solve, but the issue above occurs with or without it and the version without passes all tests. Modify test_main.py::TestLsLl.test_ll() to use Color.foo.value .
- Loading branch information