Skip to content

Commit b8d15e3

Browse files
authored
Docs: fix broken internal refs, fix broken intersphinx cross-refs to multidict, minor styling fixes (#665)
1 parent 2830a3d commit b8d15e3

File tree

7 files changed

+31
-19
lines changed

7 files changed

+31
-19
lines changed

.readthedocs.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
3+
python:
4+
install:
5+
- requirements: requirements/doc.txt
6+
7+
sphinx:
8+
builder: html
9+
configuration: docs/conf.py
10+
fail_on_warning: true

CHANGES/665.doc.1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed broken internal references to :meth:`~URL.human_repr`.

CHANGES/665.doc.2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed broken external references to :doc:`multidict:index` docs.

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ cov: lint .develop
5353

5454

5555
doc: doctest doc-spelling
56-
make -C docs html SPHINXOPTS="-W -E"
56+
make -C docs html SPHINXOPTS="-W -E --keep-going -n"
5757
@echo "open file://`pwd`/docs/_build/html/index.html"
5858

5959

6060
doctest: .develop
61-
make -C docs doctest SPHINXOPTS="-W -E"
61+
make -C docs doctest SPHINXOPTS="-W -E --keep-going -n"
6262

6363

6464
doc-spelling:
65-
make -C docs spelling SPHINXOPTS="-W -E"
65+
make -C docs spelling SPHINXOPTS="-W -E --keep-going -n"

docs/api.rst

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Public API
77
.. currentmodule:: yarl
88

99

10-
The only public *yarl* class is ``URL``:
10+
The only public *yarl* class is :class:`URL`:
1111

1212
.. doctest::
1313

@@ -66,7 +66,7 @@ Already encoded URL is not changed:
6666
>>> URL('http://xn--jxagkqfkduily1i.eu')
6767
URL('http://xn--jxagkqfkduily1i.eu')
6868

69-
Use :meth:`URL.human_repr` for getting human readable representation:
69+
Use :meth:`~URL.human_repr` for getting human readable representation:
7070

7171
.. doctest::
7272

@@ -101,7 +101,7 @@ There are two kinds of properties: *decoded* and *encoded* (with
101101
.. attribute:: URL.scheme
102102

103103
Scheme for absolute URLs, empty string for relative URLs or URLs
104-
starting with `'//'` (:ref:`yarl-api-relative-urls`).
104+
starting with ``'//'`` (:ref:`yarl-api-relative-urls`).
105105

106106
.. doctest::
107107

@@ -431,7 +431,7 @@ Absolute URL should start from either *scheme* or ``'//'``.
431431
A check for absolute URLs.
432432

433433
Return ``True`` for absolute ones (having *scheme* or starting
434-
with ``//``), ``False`` otherwise.
434+
with ``'//'``), ``False`` otherwise.
435435

436436
.. doctest::
437437

@@ -449,11 +449,12 @@ New URL generation
449449
------------------
450450

451451
URL is an immutable object, every operation described in the
452-
section generates a new *URL* instance.
452+
section generates a new :class:`URL` instance.
453453

454454
.. method:: URL.build(*, scheme=..., authority=..., user=..., password=..., \
455-
host=..., port=..., path=..., query=.., \
455+
host=..., port=..., path=..., query=..., \
456456
query_string=..., fragment=..., encoded=False)
457+
:classmethod:
457458

458459
Creates and returns a new URL:
459460

@@ -616,7 +617,7 @@ section generates a new *URL* instance.
616617
completely.
617618

618619

619-
Returned ``URL`` object will contain query string which updated
620+
Returned :class:`URL` object will contain query string which updated
620621
parts from passed query parts (or parts of parsed query string).
621622

622623
Accepts any :class:`~collections.abc.Mapping` (e.g. :class:`dict`,
@@ -791,7 +792,7 @@ All URL data is stored in encoded form internally. It's pretty good
791792
for passing ``str(url)`` everywhere URL string is accepted but quite
792793
bad for memorizing by humans.
793794

794-
.. method:: human_repr()
795+
.. method:: URL.human_repr()
795796

796797
Return decoded human readable string for URL representation.
797798

docs/conf.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@
6767
pass
6868

6969
intersphinx_mapping = {
70-
"python": ("http://docs.python.org/3", None),
71-
"multidict": ("http://multidict.readthedocs.io/", None),
70+
"python": ("https://docs.python.org/3", None),
71+
"multidict": ("https://multidict.readthedocs.io/en/stable", None),
7272
}
7373

7474

@@ -403,6 +403,5 @@
403403
#
404404
# texinfo_no_detailmenu = False
405405

406-
407-
# Example configuration for intersphinx: refer to the Python standard library.
408-
intersphinx_mapping = {"https://docs.python.org/": None}
406+
default_role = "any"
407+
nitpicky = True

docs/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ getting *encoded* strings:
7676
>>> url.raw_path
7777
'/%D0%BF%D1%83%D1%82%D1%8C'
7878

79-
Human readable representation of URL is available as :meth:`~yarl.URL.human_repr()`:
79+
Human readable representation of URL is available as :meth:`~yarl.URL.human_repr`:
8080

8181
.. doctest::
8282

@@ -101,7 +101,7 @@ manylinux-compliant because of the missing glibc and therefore, cannot be
101101
used with our wheels) the the tarball will be used to compile the library from
102102
the source code. It requires a C compiler and and Python headers installed.
103103

104-
To skip the compilation you must explicitly opt-in by setting the `YARL_NO_EXTENSIONS`
104+
To skip the compilation you must explicitly opt-in by setting the ``YARL_NO_EXTENSIONS``
105105
environment variable to a non-empty value, e.g.:
106106

107107
::
@@ -115,7 +115,7 @@ by this variable.
115115
Dependencies
116116
------------
117117

118-
YARL requires :mod:`multidict` library.
118+
``yarl`` requires :mod:`multidict` library.
119119

120120
It installs it automatically.
121121

0 commit comments

Comments
 (0)