U C^s@stddlmZddlmZddlmZddlmZGdddeZ Gddde Z Gd d d e Z Gd d d e Z d S)document_model_driven_methoddocument_wait_methoddocument_paginate_method)DocumentStructurecsZeZdZdZfddZfddZddZdd d Zd d ZeZ d dZ ddZ Z S)LazyLoadedDocstringa0Used for lazily loading docstrings You can instantiate this class and assign it to a __doc__ value. The docstring will not be generated till accessed via __doc__ or help(). Note that all docstring classes **must** subclass from this class. It cannot be used directly as a docstring. cs$tt|||_||_d|_dS)z The args and kwargs are the same as the underlying document generation function. These just get proxied to the underlying function. N)superr __init__ _gen_args _gen_kwargs _docstringselfargskwargs __class__=/tmp/pip-install-6_kvzl1k/botocore/botocore/docs/docstring.pyr szLazyLoadedDocstring.__init__cstt||SN)r r __new__)clsrrrrrr&szLazyLoadedDocstring.__new__cOs tddS)Nzq_write_docstring is not implemented. Please subclass from this class and provide your own _write_docstring method)NotImplementedErrorrrrr_write_docstring*sz$LazyLoadedDocstring._write_docstringcCs|jdkr||j|S)aExpands tabs to spaces So this is a big hack in order to get lazy loaded docstring work for the ``help()``. In the ``help()`` function, ``pydoc`` and ``inspect`` are used. At some point the ``inspect.cleandoc`` method is called. To clean the docs ``expandtabs`` is called and that is where we override the method to generate and return the docstrings. N)r _generate expandtabs)rtabsizerrrr0s zLazyLoadedDocstring.expandtabscCs|Sr)rrrrr__str__>szLazyLoadedDocstring.__str__cCs|jdkr||_|jSr)r_create_docstringr rrrrDs  zLazyLoadedDocstring._generatecCs0tddd}|j|f|j|j|dS)NZ docstringhtml)targetzutf-8)rrr r Zflush_structuredecode)rZdocstring_structurerrrr"Js z%LazyLoadedDocstring._create_docstring)r) __name__ __module__ __qualname____doc__r rrrr!__repr__rr" __classcell__rrrrr s  r c@seZdZddZdS)ClientMethodDocstringcOst||dSrrrrrrrUsz&ClientMethodDocstring._write_docstringNr&r'r(rrrrrr,Tsr,c@seZdZddZdS)WaiterDocstringcOst||dSrrrrrrrZsz WaiterDocstring._write_docstringNr-rrrrr.Ysr.c@seZdZddZdS)PaginatorDocstringcOst||dSrrrrrrr_sz#PaginatorDocstring._write_docstringNr-rrrrr/^sr/N) Zbotocore.docs.methodrZbotocore.docs.waiterrZbotocore.docs.paginatorrZbotocore.docs.bcdoc.restdocrstrr r,r.r/rrrr s    A