summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Furman <ethan@stoneleaf.us>2021-06-16 01:51:19 (GMT)
committerGitHub <noreply@github.com>2021-06-16 01:51:19 (GMT)
commit741b8ae1cfc507902eb57e20f003487af13e40c0 (patch)
tree685e72af60f09294fbe5195ce2fc08e540181afe
parentac38a9f2dfbba95f5d4338eb11a0221d38ef9328 (diff)
downloadcpython-741b8ae1cfc507902eb57e20f003487af13e40c0.zip
cpython-741b8ae1cfc507902eb57e20f003487af13e40c0.tar.gz
cpython-741b8ae1cfc507902eb57e20f003487af13e40c0.tar.bz2
bpo-44342: [Enum] sync current docs to 3.10 (GH-26750)
-rw-r--r--Doc/library/enum.rst2
-rw-r--r--Lib/enum.py2
-rw-r--r--Lib/test/test_enum.py4
3 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst
index e1263f1..d53e340 100644
--- a/Doc/library/enum.rst
+++ b/Doc/library/enum.rst
@@ -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::
diff --git a/Lib/enum.py b/Lib/enum.py
index 49c46ea..9077798 100644
--- a/Lib/enum.py
+++ b/Lib/enum.py
@@ -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
diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py
index 4626c24..c4c458e 100644
--- a/Lib/test/test_enum.py
+++ b/Lib/test/test_enum.py
@@ -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):