Skip to content

Commit 741b8ae

Browse files
authored
bpo-44342: [Enum] sync current docs to 3.10 (GH-26750)
1 parent ac38a9f commit 741b8ae

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Doc/library/enum.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ Data Types
576576
... NEON = 31
577577
Traceback (most recent call last):
578578
...
579-
ValueError: invalid Flag 'Color': 'WHITE' is missing a named flag for value 8; 'NEON' is missing named flags for values 8, 16
579+
ValueError: invalid Flag 'Color': aliases WHITE and NEON are missing combined values of 0x18 [use enum.show_flag_values(value) for details]
580580

581581
.. note::
582582

Lib/enum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1637,7 +1637,7 @@ def __call__(self, enumeration):
16371637
else:
16381638
value = 'combined values of 0x%x' % missing_value
16391639
raise ValueError(
1640-
'invalid Flag %r: %s %s [use `enum.show_flag_values(value)` for details]'
1640+
'invalid Flag %r: %s %s [use enum.show_flag_values(value) for details]'
16411641
% (cls_name, alias, value)
16421642
)
16431643
return enumeration

Lib/test/test_enum.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3614,7 +3614,7 @@ class Bizarre(Flag):
36143614
self.assertEqual(Bizarre.d.value, 6)
36153615
with self.assertRaisesRegex(
36163616
ValueError,
3617-
"invalid Flag 'Bizarre': aliases b and d are missing combined values of 0x3 .use `enum.show_flag_values.value.` for details.",
3617+
"invalid Flag 'Bizarre': aliases b and d are missing combined values of 0x3 .use enum.show_flag_values.value. for details.",
36183618
):
36193619
@verify(NAMED_FLAGS)
36203620
class Bizarre(Flag):
@@ -3633,7 +3633,7 @@ class Bizarre(IntFlag):
36333633
self.assertEqual(Bizarre.d.value, 6)
36343634
with self.assertRaisesRegex(
36353635
ValueError,
3636-
"invalid Flag 'Bizarre': alias d is missing value 0x2 .use `enum.show_flag_values.value.` for details.",
3636+
"invalid Flag 'Bizarre': alias d is missing value 0x2 .use enum.show_flag_values.value. for details.",
36373637
):
36383638
@verify(NAMED_FLAGS)
36393639
class Bizarre(IntFlag):

0 commit comments

Comments
 (0)