mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-116040: [Enum] fix test_empty_names test (GH-116508)
* and fix _not_given usage
This commit is contained in:
parent
34920f3691
commit
3c0dcef980
2 changed files with 8 additions and 14 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue