Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8d28c9a

Browse files
authored
Merge pull request #1691 from pre-commit/slightly_simpler_enum
use slightly simpler enum syntax
2 parents e836e55 + 55cdfc6 commit 8d28c9a

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

pre_commit/envcontext.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@
88
from typing import Tuple
99
from typing import Union
1010

11-
12-
class _Unset(enum.Enum):
13-
UNSET = 1
14-
15-
11+
_Unset = enum.Enum('_Unset', 'UNSET')
1612
UNSET = _Unset.UNSET
1713

1814

0 commit comments

Comments
 (0)