Skip to content

Commit fcb50ff

Browse files
committed
Improve docs layout
1 parent b644c03 commit fcb50ff

File tree

4 files changed

+26
-1
lines changed

4 files changed

+26
-1
lines changed

doc-source/api/pypi-json.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@
77
:no-members:
88
:autosummary-members:
99

10+
.. autosummary-widths:: 40/100
11+
1012
.. autoclass:: pypi_json.PyPIJSON
1113
:member-order: bysource
14+
:no-show-inheritance:
1215

1316
.. autonamedtuple:: pypi_json.ProjectMetadata
1417
:member-order: bysource
18+
:exclude-members: __repr__
1519

1620
.. autovariable:: pypi_json.USER_AGENT
1721
:no-value:

doc-source/api/typehints.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
:mod:`pypi_json.typehints`
33
============================
44

5+
.. autosummary-widths:: 35/100
56
.. automodule:: pypi_json.typehints

pypi_json/__init__.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,24 @@
6767
class ProjectMetadata(NamedTuple):
6868
"""
6969
Represents a project's metadata from the PyPI JSON API.
70+
71+
:param info: Generic information about a specific version of a project.
72+
73+
:bold-title:`Attributes:`
74+
75+
.. autosummary::
76+
77+
~pypi_json.ProjectMetadata.name
78+
~pypi_json.ProjectMetadata.version
79+
80+
**Methods:**
81+
82+
.. autosummary::
83+
84+
~pypi_json.ProjectMetadata.get_latest_version
85+
~pypi_json.ProjectMetadata.get_releases_with_digests
86+
~pypi_json.ProjectMetadata.get_releases
87+
~pypi_json.ProjectMetadata.get_wheel_tag_mapping
7088
"""
7189

7290
#: Generic information about a specific version of a project.
@@ -206,6 +224,8 @@ class PyPIJSON:
206224
:param session: Optional :class:`requests.Session` object to use instead of creating a fresh one.
207225
208226
.. _another authentication object accepted by requests: https://requests.readthedocs.io/en/master/user/authentication/
227+
228+
.. latex:clearpage::
209229
"""
210230

211231
timeout: ClassVar[int] = 10

pypi_json/typehints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ class DistributionPackageDict(TypedDict):
190190

191191
class FileURL(TypedDict):
192192
"""
193-
:class:`typing.TypedDict` representing the output of
193+
Represents the output of
194194
:meth:`ProjectMetadata.get_releases_with_digests <pypi_json.ProjectMetadata.get_releases_with_digests>`.
195195
""" # noqa: D400
196196

0 commit comments

Comments
 (0)