gh-116040: [Enum] fix test_empty_names test (GH-116508)

* and fix _not_given usage
This commit is contained in:
Ethan Furman 2024-03-11 13:42:01 -07:00 committed by GitHub
parent 34920f3691
commit 3c0dcef980
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 14 deletions

View file

@ -165,8 +165,6 @@ def _dedent(text):
class _not_given:
def __repr__(self):
return('<not given>')
def __bool__(self):
return False
_not_given = _not_given()
class _auto_null:
@ -727,7 +725,7 @@ class EnumType(type):
)
return cls._create_(
class_name=value,
names=names or None,
names=None if names is _not_given else names,
module=module,
qualname=qualname,
type=type,