From 37d862355b3f441efdde95648b866ac94a62e35c Mon Sep 17 00:00:00 2001 From: rlskoeser Date: Fri, 8 Nov 2024 17:11:51 -0500 Subject: [PATCH] Adjustments and documentation suggested by @coderabbitai --- src/undate/converters/edtf/converter.py | 7 +++++++ src/undate/undate.py | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/undate/converters/edtf/converter.py b/src/undate/converters/edtf/converter.py index 7f6edee..394dd7d 100644 --- a/src/undate/converters/edtf/converter.py +++ b/src/undate/converters/edtf/converter.py @@ -13,6 +13,13 @@ class EDTFDateConverter(BaseDateConverter): + """ + Converter for Extended Date/Time Format (EDTF). + + Supports parsing and serializing dates and date ranges in EDTF format. + Does not support all of EDTF, and only supports dates and not times. + """ + #: converter name: EDTF name: str = "EDTF" diff --git a/src/undate/undate.py b/src/undate/undate.py index d17a8ae..cda08d4 100644 --- a/src/undate/undate.py +++ b/src/undate/undate.py @@ -12,7 +12,7 @@ class Undate: """object for representing uncertain, fuzzy or partially unknown dates""" - DEFAULT_FORMAT: str = "ISO8601" + DEFAULT_CONVERTER: str = "ISO8601" #: symbol for unknown digits within a date value MISSING_DIGIT: str = "X" @@ -138,7 +138,7 @@ def __init__( if converter is None: # import all subclass definitions; initialize the default converter_cls = BaseDateConverter.available_converters()[ - self.DEFAULT_FORMAT + self.DEFAULT_CONVERTER ] converter = converter_cls() self.converter = converter