File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 2222import unicodedata
2323
2424from gettext import gettext as _
25- from typing import Any , Dict , List
25+ from typing import Any , Dict , List , Optional
2626
2727from diffuse import utils
2828from diffuse .resources import theResources
@@ -173,21 +173,21 @@ def __init__(self) -> None:
173173
174174 # class describing a single line of a pane
175175 class Line :
176- def __init__ (self , line_number = None , text = None ):
176+ def __init__ (self , line_number : Optional [ int ] = None , text : Optional [ str ] = None ) -> None :
177177 # line number
178178 self .line_number = line_number
179179 # original text for the line
180180 self .text = text
181181 # flag indicating modifications are present
182182 self .is_modified = False
183183 # actual modified text
184- self .modified_text = None
184+ self .modified_text : Optional [ str ] = None
185185 # cache used to speed up comparison of strings
186186 # this should be cleared whenever the comparison preferences change
187- self .compare_string = None
187+ self .compare_string : Optional [ str ] = None
188188
189189 # returns the current text for this line
190- def getText (self ):
190+ def getText (self ) -> Optional [ str ] :
191191 if self .is_modified :
192192 return self .modified_text
193193 return self .text
You can’t perform that action at this time.
0 commit comments