Open Mahi opened 8 years ago
Since colorama supports both Python 2 and 3, using the Enum
type (introduced in Python 3.4) is not an option as far as I know. There is also an issue here because Back
is an instance of AnsiCodes
(so not really a type) with modified attributes computed at runtime - so even if enum
was available, this would not be a simple fix.
Do you have other ideas on how to fix this? My only solution is using "str" as the type hint for now.
Apparently colorama uses a custom
AnsiCodes
class instead ofEnum
for its data. Unfortunately this causes colorama to not work with Python'styping
module due to this line.Example: