I want to select every __init__ function and add -> None to the end if it does not already exist. For example:
def __init__(self) -> None:
def __init__(self):
def __init__(self, var1, var2):
def __init__(self, var1, var2) -> None:
def __init__(self,
var1= 5,
var2: int = 4
var3 = None
):
def (self,
var1= 5,
var2= 4) -> None:
I've figured out that (def __init__\((.*?))(:) seems to select the right lines, but I can't figure out how to make it ignore lines/groups of lines that contain: -> None.
