Closed iamgodot closed 2 years ago
Thanks for the bug report. Looks like you already have an idea on the fix, interested in creating a PR? I'll happily review it.
Thanks for the bug report. Looks like you already have an idea on the fix, interested in creating a PR? I'll happily review it.
Sure, it's here, please let me know if I need to change anything :)
Great, I'll close this now.
Bug case
Currently the
_FORMATTER
informat.py
misses three categories defined inAttrCategory
enums, which will easily break the code during formatting, for instance:The direct cause comes from one of
Person.__class_getitem__
, which falls into categoryTYPING
, tand he other two missing categories areSLOT
andPATTERN_MATCHING
.Fix proposal
One easy way would be add a default formatter when getting from
_FORMATTER
. On the other hand, this_FORMATTER
dict seems a bit redundant, so do theATTR_MAP
inattr_category.py
(IMHO).