From 3691657184304e2b1e5e06aea75cf9bbaf858bc6 Mon Sep 17 00:00:00 2001 From: Sebastiaan Zeeff <33516116+SebastiaanZ@users.noreply.github.com> Date: Mon, 23 Sep 2019 23:19:05 +0200 Subject: Restructure Duration converter docstring In this commit, I've restructured the Duration converter's docstring to a more readable format: a bullet point list. --- bot/converters.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/bot/converters.py b/bot/converters.py index db3e2a426..339da7b60 100644 --- a/bot/converters.py +++ b/bot/converters.py @@ -195,10 +195,16 @@ class Duration(Converter): """ Converts a `duration` string to a datetime object that's `duration` in the future. - The converter supports years (symbols: `years`, `year, `Y`, `y`), months (`months`, `month`, - `m`), weeks (`weeks`, `week`, `W`, `w`), days (`days`, `day`, `D`, `d`), hours (`hours`, - `hour`, `H`, `h`), minutes (`minutes`, `minute`, `M`), and seconds (`seconds`, `second`, - `S`, `s`), The units must be provided in descending order of magnitude. + The converter supports the following symbols for each unit of time: + - years: `Y`, `y`, `year`, `years` + - months: `m`, `month`, `months` + - weeks: `w`, `W`, `week`, `weeks` + - days: `d`, `D`, `day`, `days` + - hours: `H`, `h`, `hour`, `hours` + - minutes: `M`, `minute`, `minutes` + - seconds: `S`, `s`, `second`, `seconds` + + The units need to be provided in descending order of magnitude. """ match = self.duration_parser.fullmatch(duration) if not match: -- cgit v1.2.3