module documentation

Support for Sphinx compatibility.

Class CacheT Undocumented
Class IntersphinxCache An Intersphinx cache.
Class SphinxInventory Sphinx inventory handler.
Class SphinxInventoryWriter Sphinx inventory handler.
Exception InvalidMaxAge Raised when a string cannot be parsed as a maximum age.
Function parseMaxAge Parse a string into a maximum age dictionary.
Function prepareCache Prepare an Intersphinx cache.
Constant MAX_AGE_DEFAULT Undocumented
Constant MAX_AGE_HELP Undocumented
Constant USER_INTERSPHINX_CACHE Undocumented
Variable logger Undocumented
Class _Unit A unit of time for maximum age parsing.
Function _parseInventoryLine Parse a single line from a Sphinx inventory.
Variable _maxAgeUnitNames Undocumented
Variable _maxAgeUnits Undocumented
def parseMaxAge(maxAge: str) -> dict[str, int]: (source)

Parse a string into a maximum age dictionary.

Parameters
maxAge:strA string consisting of an integer number followed by a single character unit.
Returns
dict[str, int]A dictionary whose keys match datetime.timedelta's arguments.
Raises
InvalidMaxAgewhen a string cannot be parsed.
def prepareCache(clearCache: bool, enableCache: bool, cachePath: str, maxAge: str, sessionFactory: Callable[[], requests.Session] = requests.Session) -> IntersphinxCache: (source)

Prepare an Intersphinx cache.

Parameters
clearCache:boolRemove the cache?
enableCache:boolEnable the cache?
cachePath:strPath of the cache directory.
maxAge:strThe maximum age in seconds of cached Intersphinx objects.inv files.
sessionFactory:Callable[[], requests.Session](optional) A zero-argument callable that returns a requests.Session.
Returns
IntersphinxCacheA IntersphinxCache instance.
MAX_AGE_DEFAULT: str = (source)

Undocumented

Value
'1w'
MAX_AGE_HELP = (source)

Undocumented

Value
textwrap.dedent(f'\n    The maximum age of any entry in the cache.  Of the forma
t\n    <int><unit> where <unit> is one of {_maxAgeUnitNames}.\n    ')
USER_INTERSPHINX_CACHE = (source)

Undocumented

Value
appdirs.user_cache_dir('pydoctor')

Undocumented

def _parseInventoryLine(line: str) -> tuple[str, str, int, str, str]: (source)

Parse a single line from a Sphinx inventory.

Raises
ValueErrorIf the line does not conform to the syntax.
_maxAgeUnitNames = (source)

Undocumented

_maxAgeUnits = (source)

Undocumented