Skip to content

Commit 170fde8

Browse files
MrMinobrettcannon
andcommitted
Document InvalidWheelFilename and InvalidSdistFilename
Also applied suggestions from code review Co-authored-by: Brett Cannon <brett@python.org>
1 parent b0515ff commit 170fde8

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

docs/utils.rst

+11-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Reference
6363
instance of :class:`~packaging.tags.Tag`.
6464

6565
:param str filename: The name of the wheel file.
66-
:raises packaging.utils.InvalidWheelFilename: If the filename in question
66+
:raises InvalidWheelFilename: If the filename in question
6767
does not follow conventions outlined in `PEP 427`_.
6868

6969
.. doctest::
@@ -89,7 +89,7 @@ Reference
8989
represented by an instance of :class:`~packaging.version.Version`.
9090

9191
:param str filename: The name of the sdist file.
92-
:raises packaging.utils.InvalidSdistFilename: If the filename does not end
92+
:raises InvalidSdistFilename: If the filename does not end
9393
with an sdist extension (``.zip`` or ``.tar.gz``), or if it does not
9494
contain a dash separating the name and the version of the distribution.
9595

@@ -103,5 +103,14 @@ Reference
103103
>>> ver == Version('1.0')
104104
True
105105

106+
107+
.. exception:: InvalidWheelFilename
108+
109+
Raised when a file name for a wheel is invalid.
110+
111+
.. exception:: InvalidSdistFilename
112+
113+
Raised a source distribution file name is considered invalid.
114+
106115
.. _Source distribution format: https://packaging.python.org/specifications/source-distribution-format/#source-distribution-file-name
107116
.. _`PEP 427`: https://peps.python.org/pep-0427/#file-name-convention

0 commit comments

Comments
 (0)