33from typing import NamedTuple
44
55from cedarscript_ast_parser import Marker , RelativeMarker , RelativePositionType , MarkerType , BodyOrWhole
6- from text_manipulation .indentation_kit import get_line_indent_count
6+ from .indentation_kit import get_line_indent_count
77
88MATCH_TYPES = ('exact' , 'stripped' , 'normalized' , 'partial' )
99
@@ -36,13 +36,13 @@ def inc(self, count: int = 1):
3636 def dec (self , count : int = 1 ):
3737 return self ._replace (start = self .start - count , end = self .end - count )
3838
39- def read [ S : Sequence [ str ]] (self , src : S ) -> S :
39+ def read (self , src : Sequence [ str ] ) -> Sequence [ str ] :
4040 return src [self .start :self .end ]
4141
42- def write [ S : Sequence [ str ]] (self , src : S , target : S ):
42+ def write (self , src : Sequence [ str ] , target : Sequence [ str ] ):
4343 target [self .start :self .end ] = src
4444
45- def delete [ S : Sequence [ str ]] (self , src : S ) -> S :
45+ def delete (self , src : Sequence [ str ] ) -> Sequence [ str ] :
4646 result = self .read (src )
4747 del src [self .start :self .end ]
4848 return result
@@ -52,12 +52,12 @@ def normalize_line(line: str):
5252 return re .sub (r'[^\w]' , '.' , line .strip (), flags = re .UNICODE )
5353
5454 @classmethod
55- def from_line_marker [ T : RangeSpec ] (
56- cls : T ,
55+ def from_line_marker (
56+ cls ,
5757 lines : Sequence [str ],
5858 search_term : Marker ,
5959 search_range : 'RangeSpec' = None
60- ) -> T | None :
60+ ):
6161 """
6262 Find the index of a specified line within a list of strings, considering different match types and an offset.
6363
0 commit comments