def type_error_to_diagnostic(type_error: error.Error) -> lsp.Diagnostic:
    return lsp.Diagnostic(range=lsp.Range(start=lsp.Position(line=(type_error.line - 1), character=type_error.column), end=lsp.Position(line=(type_error.stop_line - 1), character=type_error.stop_column)), message=type_error.description, severity=lsp.DiagnosticSeverity.ERROR, code=None, source='Pyre')
def type_error_to_diagnostic(type_error: error.Error) -> lsp.Diagnostic:
    return lsp.Diagnostic(range=lsp.Range(start=lsp.Position(line=(type_error.line - 1), character=type_error.column), end=lsp.Position(line=(type_error.stop_line - 1), character=type_error.stop_column)), message=type_error.description, severity=lsp.DiagnosticSeverity.ERROR, code=None, source='Pyre')