Skip to content

Commit

Permalink
Update docs to reflect rich comparison changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Jul 22, 2021
1 parent 11d82c9 commit bd0b7f8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apeye/url.py
Expand Up @@ -98,7 +98,8 @@ class URLPath(pathlib.PurePosixPath):
Implemented :meth:`~.URLPath.is_absolute`, :meth:`~.URLPath.joinpath`,
:meth:`~.URLPath.relative_to`, :meth:`~.pathlib.PurePath.match`,
``anchor`` and ``drive``, which previously raised :exc:`NotImplementedError`.
``anchor``, ``drive``, and support for rich comparisons (``<``, ``<=``, ``>`` and ``>=``),
which previously raised :exc:`NotImplementedError`.
"""

def __str__(self) -> str:
Expand Down Expand Up @@ -196,6 +197,10 @@ class URL(os.PathLike):
.. versionchanged:: 0.3.0 The ``url`` parameter can now be a string or a :class:`~.URL`.
.. versionchanged:: 1.1.0
Added support for sorting and rich comparisons (``<``, ``<=``, ``>`` and ``>=``).
.. autoclasssumm:: URL
:autosummary-sections: Methods
Expand Down Expand Up @@ -649,6 +654,8 @@ def relative_to(self, other: Union[str, "URL", URLPath]) -> URLPath:
"""
Returns a version of this URL's path relative to ``other``.
.. versionadded:: 1.1.0
:param other: Either a :class:`~.URL`, or a string or :class:`~.URLPath` representing an *absolute* path.
If a :class:`~.URL`, the :attr:`~.URL.netloc` must match this URL's.
Expand Down
5 changes: 5 additions & 0 deletions doc-source/api/url.rst
Expand Up @@ -12,10 +12,15 @@
.. autotypevar:: apeye.url.URLType
.. autotypevar:: apeye.url.URLPathType

.. latex:clearpage::
.. autosummary-widths:: 1/2

.. autoclass:: apeye.url.URL
:inherited-members:
:exclude-members: __lt__,__le__,__gt__,__ge__
:autosummary-exclude-members: __lt__,__le__,__gt__,__ge__

.. latex:vspace:: 20px
.. autosummary-widths:: 1/4
:html: 30/100
Expand Down

0 comments on commit bd0b7f8

Please sign in to comment.