diff --git a/news/1158.documentation b/news/1158.documentation new file mode 100644 index 000000000..06cce1f0f --- /dev/null +++ b/news/1158.documentation @@ -0,0 +1 @@ +Fixed broken links and removed `:py` prefix in :class:`icalendar.cal.calendar.Calendar` documentation. @lcampanella98 diff --git a/news/1158.documentation.2 b/news/1158.documentation.2 new file mode 100644 index 000000000..a825bcfaf --- /dev/null +++ b/news/1158.documentation.2 @@ -0,0 +1 @@ +Qualify ambiguous cross-references and remove remaining ``:py`` prefixed roles. @wahajahmed010 diff --git a/src/icalendar/cal/lazy.py b/src/icalendar/cal/lazy.py index 349b0940d..3fdcfa371 100644 --- a/src/icalendar/cal/lazy.py +++ b/src/icalendar/cal/lazy.py @@ -188,7 +188,7 @@ class LazyCalendar(Calendar): >>> calendar.is_lazy() True - When you access all :attr:`subcomponents` of the calendar, + When you access all :attr:`~icalendar.cal.component.Component.subcomponents` of the calendar, for example by getting their count, the entire calendar is parsed and becomes not lazy. diff --git a/src/icalendar/parser/property.py b/src/icalendar/parser/property.py index 6efca840a..7ae799d56 100644 --- a/src/icalendar/parser/property.py +++ b/src/icalendar/parser/property.py @@ -28,7 +28,7 @@ def unescape_list_or_string(val: str | list[str]) -> str | list[str]: def unescape_backslash(val: str): r"""Unescape backslash sequences in iCalendar text. - Unlike :py:meth:`unescape_string`, this only handles actual backslash escapes + Unlike :meth:`~icalendar.parser.string.unescape_string`, this only handles actual backslash escapes per :rfc:`5545`, not URL encoding. This preserves URL-encoded values like ``%3A`` in URLs. diff --git a/src/icalendar/prop/dt/date.py b/src/icalendar/prop/dt/date.py index 40ee2e076..c17565ba0 100644 --- a/src/icalendar/prop/dt/date.py +++ b/src/icalendar/prop/dt/date.py @@ -104,7 +104,7 @@ def to_jcal(self, name: str) -> list: @classmethod def parse_jcal_value(cls, jcal: str) -> date: - """Parse a jCal string to a :py:class:`datetime.date`. + """Parse a jCal string to a :class:`datetime.date`. Raises: ~error.JCalParsingError: If it can't parse a date. diff --git a/src/icalendar/prop/dt/datetime.py b/src/icalendar/prop/dt/datetime.py index 88178e4d6..238145d08 100644 --- a/src/icalendar/prop/dt/datetime.py +++ b/src/icalendar/prop/dt/datetime.py @@ -52,7 +52,7 @@ class vDatetime(TimeBase): vDatetime is timezone aware and uses a timezone library. When a vDatetime object is created from an ical string, you can pass a valid timezone identifier. When a - vDatetime object is created from a Python :py:mod:`datetime` object, it uses the + vDatetime object is created from a Python :mod:`datetime` object, it uses the tzinfo component, if present. Otherwise a timezone-naive object is created. Be aware that there are certain limitations with timezone naive DATE-TIME components in the icalendar standard. @@ -155,7 +155,7 @@ def is_utc(self) -> bool: @classmethod def parse_jcal_value(cls, jcal: str) -> datetime: - """Parse a jCal string to a :py:class:`datetime.datetime`. + """Parse a jCal string to a :class:`datetime.datetime`. Raises: ~error.JCalParsingError: If it can't parse a date-time value. diff --git a/src/icalendar/prop/dt/duration.py b/src/icalendar/prop/dt/duration.py index 871ca5a48..ce87e0d40 100644 --- a/src/icalendar/prop/dt/duration.py +++ b/src/icalendar/prop/dt/duration.py @@ -166,7 +166,7 @@ def to_jcal(self, name: str) -> list: @classmethod def parse_jcal_value(cls, jcal: str) -> timedelta: - """Parse a jCal string to a :py:class:`datetime.timedelta`. + """Parse a jCal string to a :class:`datetime.timedelta`. Raises: ~error.JCalParsingError: If it can't parse a duration.""" diff --git a/src/icalendar/prop/dt/time.py b/src/icalendar/prop/dt/time.py index a592bf00d..fde4e4e51 100644 --- a/src/icalendar/prop/dt/time.py +++ b/src/icalendar/prop/dt/time.py @@ -204,7 +204,7 @@ def to_jcal(self, name: str) -> list: @classmethod def parse_jcal_value(cls, jcal: str) -> time: - """Parse a jCal string to a :py:class:`datetime.time`. + """Parse a jCal string to a :class:`datetime.time`. Raises: ~error.JCalParsingError: If it can't parse a time.