[PATCH 03/15] parsemail: Add a function to parse series markers eg. "1/12"
Finucane, Stephen
stephen.finucane at intel.com
Sat Oct 10 10:21:12 AEDT 2015
> This can be used to identify cover letters, patches part of series,
> length of series, ...
>
> Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
Two low priority comments below. If you can fix them for the PR or a v3 then please do. Other than that:
Acked-by: Stephen Finucane <stephen.finucane at intel.com>
> +def parse_series_marker(subject_prefixes):
> + """If this patch is part a of multi-patches series, ie has x/n in its
> + subject, return (x, n). Otherwise, return (None, None)."""
Can you format docstrings with a summary and body? It makes editing in an IDE and the use of tools like PyDoc much easier (they extract the summary and use it on hover). Example:
"""Parse the series markers, if present.
If this patch is part a of multi-patches series, ie has x/n in its
subject, return (x, n). Otherwise, return (None, None).
"""
> from patchwork.bin.parsemail import find_content, find_author,
> find_project, \
> - parse_mail, split_prefixes,
> clean_subject
> + parse_mail, split_prefixes,
> clean_subject, \
> + parse_series_marker
Could you replace the escape characters with brackets?
from patchwork.bin.parsemail import (
find_content, find_author, find_project, parse_mail, split_prefixes,
clean_subject, parse_series_marker)
Or similar.
More information about the Patchwork
mailing list