(paragraph: str)
return para
Dedent paragraph using textwrap.dedent(), but properly dedents
    even if the first line of paragraph does not contain blanks.
    This handles the case where a user types a documentation string as
        '''A long string spanning
        several lines.'''
Dedent paragraph using textwrap.dedent(), but properly dedents
    even if the first line of paragraph does not contain blanks.
    This handles the case where a user types a documentation string as
        '''A long string spanning
        several lines.'''
Dedent paragraph using textwrap . dedent () but properly dedents even if the first line of paragraph does not contain blanks . This handles the case where a user types a documentation string as A long string spanning several lines .
def smartDedent(paragraph: str) -> str:
    """
    Dedent paragraph using textwrap.dedent(), but properly dedents
    even if the first line of paragraph does not contain blanks.
    This handles the case where a user types a documentation string as
        '''A long string spanning
        several lines.'''
    """
    if paragraph.startswith(' '):
        para = dedent(paragraph)
    else:
        lines = paragraph.split('\n')
        exceptFirst = dedent('\n'.join(lines[1:]))
        para = lines[0] + exceptFirst

    return para
def smartDedent ( paragraph : str ) -> str : if paragraph . startswith ( ' ' ) : para = dedent ( paragraph ) else : lines = paragraph . split ( '\n' ) exceptFirst = dedent ( '\n' . join ( lines [ 1 : ] ) ) para = lines [ 0 ] + exceptFirst return para