diff options
| author | 2021-01-10 03:39:06 +0100 | |
|---|---|---|
| committer | 2021-01-10 06:16:10 +0100 | |
| commit | 58154398d0ed905e0418451cfa7d3e8b66508bc6 (patch) | |
| tree | f94b4ed20e634f93ed392311848199bc9ec5fabe | |
| parent | Bump markdownify to 0.6.1-0.6.* (diff) | |
Expand docstring
| -rw-r--r-- | bot/exts/info/doc/_inventory_parser.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bot/exts/info/doc/_inventory_parser.py b/bot/exts/info/doc/_inventory_parser.py index b38c3b2a8..886708867 100644 --- a/bot/exts/info/doc/_inventory_parser.py +++ b/bot/exts/info/doc/_inventory_parser.py @@ -95,7 +95,12 @@ async def _fetch_inventory(url: str) -> INVENTORY_DICT: async def fetch_inventory(url: str) -> Optional[INVENTORY_DICT]: - """Get inventory from `url`, retrying `FAILED_REQUEST_ATTEMPTS` times on errors.""" + """ + Get an inventory dict from `url`, retrying `FAILED_REQUEST_ATTEMPTS` times on errors. + + `url` should point at a valid sphinx objects.inv inventory file, which will be parsed into the + inventory dict in the format of {"domain:role": [("symbol_name", "relative_url_to_symbol"), ...], ...} + """ for attempt in range(1, FAILED_REQUEST_ATTEMPTS+1): try: inventory = await _fetch_inventory(url) |