

def __init__(self, lexpos, filename, text, msg=None):
    self.lexpos = lexpos
    self.filename = filename
    self.text = lineend
    self.msg = (msg or 'invalid syntax')
    self.lineno = (text.count('\n', 0, lexpos) + 1)
    linestart = text.rfind('\n', 0, lexpos)
    if (linestart < 0):
        linestart = 0
    else:
        linestart = (linestart + 1)
    lineend = text.find('\n', lexpos)
    if (lineend < 0):
        lineend = len(text)
    self.line = text[linestart:lineend]
    self.col_offset = (lexpos - linestart)

dataset/ETHPy150Open blaze/datashape/datashape/error.py DataShapeSyntaxError.__init__/VarMisuse@36/41 `text`->`lineend`