@@ -424,9 +424,9 @@ def GetSelText(self):
424424
425425 def SetSel (self , start = 0 , end = None ):
426426 if isinstance (start , tuple ):
427- assert (
428- end is None
429- ), "If you pass a point in the first param, the second must be None"
427+ assert end is None , (
428+ "If you pass a point in the first param, the second must be None"
429+ )
430430 start , end = start
431431 elif end is None :
432432 end = start
@@ -453,9 +453,9 @@ def GetLineCount(self):
453453 def LineFromChar (self , charPos = - 1 ):
454454 if charPos == - 1 :
455455 charPos = self .GetSel ()[0 ]
456- assert (
457- charPos >= 0 and charPos <= self .GetTextLength ()
458- ), f"The charPos postion ( { charPos } ) is invalid (max= { self . GetTextLength () } )"
456+ assert charPos >= 0 and charPos <= self . GetTextLength (), (
457+ f"The charPos postion ( { charPos } ) is invalid (max= { self .GetTextLength ()} )"
458+ )
459459 # return self.SendScintilla(EM_EXLINEFROMCHAR, charPos)
460460 # EM_EXLINEFROMCHAR puts charPos in lParam, not wParam
461461 return self .SendScintilla (EM_EXLINEFROMCHAR , 0 , charPos )
@@ -476,9 +476,9 @@ def GetTextRange(self, start=0, end=-1, decode=True):
476476 if end == - 1 :
477477 end = self .SendScintilla (scintillacon .SCI_GETTEXTLENGTH )
478478 assert end >= start , "Negative index requested (%d/%d)" % (start , end )
479- assert (
480- start >= 0 and start <= self . GetTextLength ()
481- ), "The start postion is invalid"
479+ assert start >= 0 and start <= self . GetTextLength (), (
480+ "The start postion is invalid"
481+ )
482482 assert end >= 0 and end <= self .GetTextLength (), "The end postion is invalid"
483483 initer = null_byte * (end - start + 1 )
484484 buff = array .array ("b" , initer )
0 commit comments