src/cowsay/__init__.py
def wrap_bubble(lines: list[str], ops: Bubble) -> str:
    """
    Puts text into a text bubble. This is done by just inserting the given
    bracket characters onto the ends of each line.
    """
    res = [*f' {"_" * len(lines[0])} \n']
    if len(lines) == 1:
        res += f'{ops.l}{lines[0]}{ops.r}\n'
    else:
        res += f'{ops.tl}{lines[0]}{ops.tr}\n'
        for line in lines[1:-1]:
            res += f'{ops.ml}{line}{ops.mr}\n'
        res += f'{ops.bl}{lines[-1]}{ops.br}\n'
    res += f' {"-" * len(lines[0])} '
    return ''.join(res)

    Puts text into a text bubble. This is done by just inserting the given
    bracket characters onto the ends of each line.
    
Puts text into a text bubble. This is done by just inserting the given
bracket characters onto the ends of each line.
Puts text into a text bubble . This is done by just inserting the given bracket characters onto the ends of each line .
def wrap_bubble(lines: list[str], ops: Bubble) -> str:
    res = [*f' {"_" * len(lines[0])} \n']
    if len(lines) == 1:
        res += f'{ops.l}{lines[0]}{ops.r}\n'
    else:
        res += f'{ops.tl}{lines[0]}{ops.tr}\n'
        for line in lines[1:-1]:
            res += f'{ops.ml}{line}{ops.mr}\n'
        res += f'{ops.bl}{lines[-1]}{ops.br}\n'
    res += f' {"-" * len(lines[0])} '
    return ''.join(res)
def wrap_bubble ( lines : list [ str ] , ops : Bubble ) -> str : res = [ * f' {"_" * len(lines[0])} \n' ] if len ( lines ) == 1 : res += f'{ops.l}{lines[0]}{ops.r}\n' else : res += f'{ops.tl}{lines[0]}{ops.tr}\n' for line in lines [ 1 : - 1 ] : res += f'{ops.ml}{line}{ops.mr}\n' res += f'{ops.bl}{lines[-1]}{ops.br}\n' res += f' {"-" * len(lines[0])} ' return '' . join ( res )
Puts text into a text bubble.
Puts text into a text bubble .
"""
    Puts text into a text bubble. This is done by just inserting the given
    bracket characters onto the ends of each line.
    """
lines
list[str]
ops
Bubble