File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ class StringEnum(str, Enum):
80
80
value."""
81
81
82
82
def __repr__ (self ) -> str :
83
- return str (self .value )
83
+ return repr (self .value )
84
84
85
85
def __str__ (self ) -> str :
86
86
return cast (str , self .value )
Original file line number Diff line number Diff line change 10
10
from pystac import utils
11
11
from pystac .utils import (
12
12
JoinType ,
13
+ StringEnum ,
13
14
is_absolute_href ,
14
15
is_file_path ,
15
16
join_path_or_url ,
@@ -474,3 +475,10 @@ def test_join_path_or_url() -> None:
474
475
)
475
476
def test_is_file_path (href : str , expected : bool ) -> None :
476
477
assert is_file_path (href ) == expected
478
+
479
+
480
+ def test_stringenum_repr () -> None :
481
+ class SomeEnum (StringEnum ):
482
+ THIS = "this"
483
+
484
+ assert repr (SomeEnum .THIS ) == "'this'"
You can’t perform that action at this time.
0 commit comments