diff --git a/news/1072.documentation.5 b/news/1072.documentation.5 new file mode 100644 index 000000000..79f0fdf3a --- /dev/null +++ b/news/1072.documentation.5 @@ -0,0 +1 @@ +Corrected the xCal parser parameter documentation for UNKNOWN property values; used OpenAI GPT-6 to draft and check the wording. @sshnox diff --git a/src/icalendar/prop/unknown.py b/src/icalendar/prop/unknown.py index b4fd43b70..d6938c342 100644 --- a/src/icalendar/prop/unknown.py +++ b/src/icalendar/prop/unknown.py @@ -183,10 +183,14 @@ def from_xcal(cls, parser: XCalParser, params: Parameters) -> Self: """Parse xCal from :rfc:`6321`. Parameters: - xml: The XML to parse or a parser. + parser: The xCal parser containing the UNKNOWN value. + params: The property parameters to update with the UNKNOWN value type. + + Returns: + The parsed UNKNOWN property value. Raises: - ~error.XCalParsingError: If the provided xCal is invalid. + ~icalendar.error.XCalParsingError: If the provided xCal is invalid. """ element = parser.parse_tag(cls.default_value) params.value = cls.default_value # UNKNOWN is never the default type @@ -200,10 +204,14 @@ def from_first_xcal_element(cls, parser: XCalParser, params: Parameters) -> Self This class is used as a fallback if no other type can parse this. Parameters: - xml: The XML to parse or a parser. + parser: The xCal parser containing the UNKNOWN value. + params: The property parameters to update with the UNKNOWN value type. + + Returns: + The parsed UNKNOWN property value. Raises: - ~error.XCalParsingError: If the provided xCal is invalid. + ~icalendar.error.XCalParsingError: If the provided xCal is invalid. """ element = parser.parse_tag() params.value = element.tag.upper() # set the VALUE parameter