gh93107: [Enum] fix missing variable in global_str (GH-93107)

This commit is contained in:
Ethan Furman 2022-05-23 08:56:07 -07:00 committed by GitHub
parent b2694ab469
commit 046df59658
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View file

@ -1640,6 +1640,7 @@ def global_str(self):
use enum_name instead of class.enum_name
"""
if self._name_ is None:
cls_name = self.__class__.__name__
return "%s(%r)" % (cls_name, self._value_)
else:
return self._name_