File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -800,11 +800,11 @@ def test_repr(self):
800
800
assert repr (self .offset6 ) == '<BusinessHour: BH=20:00-05:00>'
801
801
assert repr (self .offset7 ) == '<-2 * BusinessHours: BH=21:30-06:30>'
802
802
assert (repr (self .offset8 ) ==
803
- '<BusinessHour: BH=09:00,13:00 -12:00,17:00>' )
803
+ '<BusinessHour: BH=09:00-12:00,13:00- 17:00>' )
804
804
assert (repr (self .offset9 ) ==
805
- '<3 * BusinessHours: BH=09:00,22:00 -13:00,03:00>' )
805
+ '<3 * BusinessHours: BH=09:00-13:00,22:00- 03:00>' )
806
806
assert (repr (self .offset10 ) ==
807
- '<-1 * BusinessHour: BH=13:00,23:00 -17:00,02:00>' )
807
+ '<-1 * BusinessHour: BH=13:00-17:00,23:00- 02:00>' )
808
808
809
809
def test_with_offset (self ):
810
810
expected = Timestamp ('2014-07-01 13:00' )
Original file line number Diff line number Diff line change @@ -862,10 +862,10 @@ def _onOffset(self, dt):
862
862
863
863
def _repr_attrs (self ):
864
864
out = super ()._repr_attrs ()
865
- start = ',' .join (st .strftime ('%H:%M' ) for st in self . start )
866
- end = ',' . join ( en . strftime ( '%H:%M' ) for en in self .end )
867
- attrs = ['{prefix}={start}-{end }' .format (prefix = self ._prefix ,
868
- start = start , end = end )]
865
+ hours = ',' .join ('{}-{}' . format ( st .strftime ('%H:%M' ), en . strftime ( '%H:%M' ) )
866
+ for st , en in zip ( self .start , self . end ) )
867
+ attrs = ['{prefix}={hours }' .format (prefix = self ._prefix ,
868
+ hours = hours )]
869
869
out += ': ' + ', ' .join (attrs )
870
870
return out
871
871
You can’t perform that action at this time.
0 commit comments