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):
8080    value.""" 
8181
8282    def  __repr__ (self ) ->  str :
83-         return  str (self .value )
83+         return  repr (self .value )
8484
8585    def  __str__ (self ) ->  str :
8686        return  cast (str , self .value )
Original file line number Diff line number Diff line change 1010from  pystac  import  utils 
1111from  pystac .utils  import  (
1212    JoinType ,
13+     StringEnum ,
1314    is_absolute_href ,
1415    is_file_path ,
1516    join_path_or_url ,
@@ -474,3 +475,10 @@ def test_join_path_or_url() -> None:
474475) 
475476def  test_is_file_path (href : str , expected : bool ) ->  None :
476477    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