bpo-44342: [Enum] sync current docs to 3.10 (GH-26750)

This commit is contained in:
Ethan Furman 2021-06-15 18:51:19 -07:00 committed by GitHub
parent ac38a9f2df
commit 741b8ae1cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -576,7 +576,7 @@ Data Types
... NEON = 31
Traceback (most recent call last):
...
ValueError: invalid Flag 'Color': 'WHITE' is missing a named flag for value 8; 'NEON' is missing named flags for values 8, 16
ValueError: invalid Flag 'Color': aliases WHITE and NEON are missing combined values of 0x18 [use enum.show_flag_values(value) for details]
.. note::

View File

@ -1637,7 +1637,7 @@ class verify:
else:
value = 'combined values of 0x%x' % missing_value
raise ValueError(
'invalid Flag %r: %s %s [use `enum.show_flag_values(value)` for details]'
'invalid Flag %r: %s %s [use enum.show_flag_values(value) for details]'
% (cls_name, alias, value)
)
return enumeration

View File

@ -3614,7 +3614,7 @@ class TestVerify(unittest.TestCase):
self.assertEqual(Bizarre.d.value, 6)
with self.assertRaisesRegex(
ValueError,
"invalid Flag 'Bizarre': aliases b and d are missing combined values of 0x3 .use `enum.show_flag_values.value.` for details.",
"invalid Flag 'Bizarre': aliases b and d are missing combined values of 0x3 .use enum.show_flag_values.value. for details.",
):
@verify(NAMED_FLAGS)
class Bizarre(Flag):
@ -3633,7 +3633,7 @@ class TestVerify(unittest.TestCase):
self.assertEqual(Bizarre.d.value, 6)
with self.assertRaisesRegex(
ValueError,
"invalid Flag 'Bizarre': alias d is missing value 0x2 .use `enum.show_flag_values.value.` for details.",
"invalid Flag 'Bizarre': alias d is missing value 0x2 .use enum.show_flag_values.value. for details.",
):
@verify(NAMED_FLAGS)
class Bizarre(IntFlag):