a cI@s2ddlZddlZddlmZGdddejZdS)N)contextmanagerc@sXeZdZejeejeeeddddZeeej ddddZ eedd d Z dS) TextWrapperN)reversed_chunkscur_linecur_lenwidthreturnc Cs^t||d}|jrH|d}|d|}||d}||||d<n|sZ||dS)N)maxbreak_long_wordsappendpop) selfrrrr space_leftlastZcutresr\/workspaces/shunt/resources/test-fastapi/venv/lib/python3.9/site-packages/click/_textwrap.py_handle_long_words    zTextWrapper._handle_long_word)indentrccsR|j}|j}|j|7_|j|7_zdVW||_||_n||_||_0dS)N)initial_indentsubsequent_indent)rrZold_initial_indentZold_subsequent_indentrrr extra_indentszTextWrapper.extra_indent)textrcCsJg}t|D].\}}|j}|dkr,|j}|||qd|S)Nr ) enumerate splitlinesrrr join)rrrvidxlinerrrr indent_only&szTextWrapper.indent_only) __name__ __module__ __qualname__tListstrintrrIteratorrr"rrrrrs  r)textwraptypingr& contextlibrrrrrrs