summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorEthan Furman <ethan@stoneleaf.us>2022-10-05 22:25:55 (GMT)
committerGitHub <noreply@github.com>2022-10-05 22:25:55 (GMT)
commitb44372e03c5461b6ad3d89763a9eb6cb82df07a4 (patch)
tree0f3396cba96005662979ef0a793a9b3d6047a064 /Lib
parentc206e53bb726fa795d10cfb0e8d1d1a1a5d1aaa7 (diff)
downloadcpython-b44372e03c5461b6ad3d89763a9eb6cb82df07a4.zip
cpython-b44372e03c5461b6ad3d89763a9eb6cb82df07a4.tar.gz
cpython-b44372e03c5461b6ad3d89763a9eb6cb82df07a4.tar.bz2
gh-96865: [Enum] fix Flag to use CONFORM boundary (GH-97528)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/enum.py2
-rw-r--r--Lib/test/test_enum.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/enum.py b/Lib/enum.py
index c3aafc2..a66c344 100644
--- a/Lib/enum.py
+++ b/Lib/enum.py
@@ -1269,7 +1269,7 @@ class FlagBoundary(StrEnum):
STRICT, CONFORM, EJECT, KEEP = FlagBoundary
-class Flag(Enum, boundary=STRICT):
+class Flag(Enum, boundary=CONFORM):
"""
Support for flags
"""
diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py
index ad421f8..f50017d 100644
--- a/Lib/test/test_enum.py
+++ b/Lib/test/test_enum.py
@@ -2927,7 +2927,7 @@ class OldTestFlag(unittest.TestCase):
self.assertEqual(bool(f.value), bool(f))
def test_boundary(self):
- self.assertIs(enum.Flag._boundary_, STRICT)
+ self.assertIs(enum.Flag._boundary_, CONFORM)
class Iron(Flag, boundary=STRICT):
ONE = 1
TWO = 2