U ez@sfddlmZddlZddlmZdddddddd Zddddd dd d Zdd ddddddZdS)) annotationsN) TracebackTypez str | bytesz str | Nonebytes)xencodingerrorsreturncCsRt|tr|St|ts,tdt|j|s4|rJ|j|p>d|pDddS|SNznot expecting type zutf-8strict)r) isinstancerstr TypeErrortype__name__encoderrrr?/opt/hc_python/lib/python3.8/site-packages/urllib3/util/util.pyto_bytess  rr cCsRt|tr|St|ts,tdt|j|s4|rJ|j|p>d|pDddS|Sr )r r rr rrdecoderrrrto_strs  rztype[BaseException] | None BaseExceptionzTracebackType | Noneztyping.NoReturn)tpvaluetbrcCs,z|j|k r|||W5d}d}XdS)N) __traceback__with_traceback)rrrrrrreraises   r)NN)NN)N) __future__rtypingtypesrrrrrrrrs