mirror of
https://github.com/Instagram/LibCST.git
synced 2025-12-23 10:35:53 +00:00
Better serialization for MaybeSentinel
This commit is contained in:
parent
8ff42de3c5
commit
e5938df16a
2 changed files with 5 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
|||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
# pyre-strict
|
||||
from enum import Enum, auto
|
||||
|
||||
|
||||
|
|
@ -14,3 +15,6 @@ class MaybeSentinel(Enum):
|
|||
"""
|
||||
|
||||
DEFAULT = auto()
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return str(self)
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ class CSTNodeTest(UnitTest):
|
|||
SimpleStatementLine(
|
||||
body=[
|
||||
Pass(
|
||||
semicolon=<MaybeSentinel.DEFAULT: 1>,
|
||||
semicolon=MaybeSentinel.DEFAULT,
|
||||
),
|
||||
],
|
||||
leading_lines=[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue