~valhalla/lesana-devel

Force LesadaDate.load() return `datetime.date` when parsing v1 PROPOSED

fabrixxm: 1
 Force LesadaDate.load() return `datetime.date` when parsing

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~valhalla/lesana-devel/patches/24282/mbox | git am -3
Learn more about email & git

[PATCH] Force LesadaDate.load() return `datetime.date` when parsing Export this patch

---
 lesana/types.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lesana/types.py b/lesana/types.py
index 6e5d21d..677fbdf 100644
--- a/lesana/types.py
+++ b/lesana/types.py
@@ -278,7 +278,7 @@ class LesanaDate(LesanaType):
        # compatibility with dateutil before 2.8
        ParserError = getattr(dateutil.parser, 'ParserError', ValueError)
        try:
            return dateutil.parser.parse(data)
            return dateutil.parser.parse(data).date()
        except ParserError:
            raise LesanaValueError(
                "Invalid value for date field: {}".format(data)
-- 
2.32.0