src/sql/parse.py
def without_sql_comment(parser, line):
    """Strips -- comment from a line 

    The argparser unfortunately expects -- to precede an option, 
    but in SQL that delineates a comment.  So this removes comments 
    so a line can safely be fed to the argparser.

    :param line: A line of SQL, possibly mixed with option strings 
    :type line: str 
    """

    args = _option_strings_from_parser(parser)
    result = itertools.takewhile(
        lambda word: (not word.startswith("--")) or (word in args),
        shlex.split(line, posix=False),
    )
    return " ".join(result)
Strips -- comment from a line 

    The argparser unfortunately expects -- to precede an option, 
    but in SQL that delineates a comment.  So this removes comments 
    so a line can safely be fed to the argparser.

    :param line: A line of SQL, possibly mixed with option strings 
    :type line: str 
    
- comment from a line
The argparser unfortunately expects -- to precede an option,
but in SQL that delineates a comment.  So this removes comments
so a line can safely be fed to the argparser.
- comment from a line The argparser unfortunately expects -- to precede an option but in SQL that delineates a comment . So this removes comments so a line can safely be fed to the argparser .
def without_sql_comment(parser, line):
    args = _option_strings_from_parser(parser)
    result = itertools.takewhile(
        lambda word: (not word.startswith("--")) or (word in args),
        shlex.split(line, posix=False),
    )
    return " ".join(result)
def without_sql_comment ( parser , line ) : args = _option_strings_from_parser ( parser ) result = itertools . takewhile ( lambda word : ( not word . startswith ( "--" ) ) or ( word in args ) , shlex . split ( line , posix = False ) , ) return " " . join ( result )
Strips -- comment from a line
The argparser unfortunately expects -- to precede an option,
but in SQL that delineates a comment.
Strips -- comment from a line The argparser unfortunately expects -- to precede an option but in SQL that delineates a comment .
"""Strips -- comment from a line 

    The argparser unfortunately expects -- to precede an option, 
    but in SQL that delineates a comment.  So this removes comments 
    so a line can safely be fed to the argparser.

    :param line: A line of SQL, possibly mixed with option strings 
    :type line: str 
    """
parser
line
A line of SQL, possibly mixed with option strings
A line of SQL possibly mixed with option strings