Skip to content

Commit

Permalink
fix Flag to use CONFORM boundary
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanfurman committed Sep 24, 2022
1 parent db39050 commit b921dbc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Lib/enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -2927,7 +2927,7 @@ def test_bool(self):
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
Expand Down

0 comments on commit b921dbc

Please sign in to comment.