From b738ea1cdcc7179a700e5d79520ee237def3daf2 Mon Sep 17 00:00:00 2001 From: Shoaib Shah <128214152+sshnox@users.noreply.github.com> Date: Wed, 18 Nov 2026 17:43:04 +0500 Subject: [PATCH 1/2] docs: correct vUnknown xCal parser parameter documentation Contributes to #1072. AI assistance: OpenAI GPT-6 inspected the two vUnknown xCal classmethod signatures and generated corrected Google-style Parameters, Returns, and exception references; the changes are limited to these two docstrings. Prompt summarized: identify stale parameter names and align docs to method signatures. --- src/icalendar/prop/unknown.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) 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 From 43cfdb8fa82a492b3c72ce7b0db8db470549b59b Mon Sep 17 00:00:00 2001 From: Shoaib Shah <128214152+sshnox@users.noreply.github.com> Date: Wed, 18 Nov 2026 17:43:18 +0500 Subject: [PATCH 2/2] docs: document vUnknown xCal parameter changes in changelog Contributes to #1072. AI: OpenAI GPT-6 drafted the changelog entry and AI usage disclosure using the updated vUnknown docs and icalendar's contribution requirements. --- news/1072.documentation.5 | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/1072.documentation.5 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