MCPcopy Create free account
hub / github.com/aws/aws-cli / expandtabs

Method expandtabs

awscli/botocore/docs/docstring.py:49–61  ·  view source on GitHub ↗

Expands 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 ca

(self, tabsize=8)

Source from the content-addressed store, hash-verified

47 )
48
49 def expandtabs(self, tabsize=8):
50 """Expands tabs to spaces
51
52 So this is a big hack in order to get lazy loaded docstring work
53 for the ``help()``. In the ``help()`` function, ``pydoc`` and
54 ``inspect`` are used. At some point the ``inspect.cleandoc``
55 method is called. To clean the docs ``expandtabs`` is called
56 and that is where we override the method to generate and return the
57 docstrings.
58 """
59 if self._docstring is None:
60 self._generate()
61 return self._docstring.expandtabs(tabsize)
62
63 def __str__(self):
64 return self._generate()

Callers 1

test_expandtabsMethod · 0.80

Calls 1

_generateMethod · 0.95

Tested by 1

test_expandtabsMethod · 0.64