Skip to content

Commit af0026c

Browse files
authored
docs(pylock): document select() method and PylockSelectError (#1153)
1 parent 668da86 commit af0026c

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

docs/pylock.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ Usage
4949
# you can validate a manually constructed Pylock class
5050
pylock.validate()
5151
52+
# select packages to install for the current environment
53+
for package, artifact in pylock.select():
54+
print(f"Install {package.name} from {artifact}")
55+
5256
Reference
5357
---------
5458

@@ -59,7 +63,7 @@ structure of a pylock file. The attributes correspond to the fields in the
5963
pylock file specification.
6064

6165
.. autoclass:: Pylock
62-
:members: from_dict, to_dict, validate
66+
:members: from_dict, to_dict, validate, select
6367
:exclude-members: __init__, __new__
6468

6569
.. class:: Package
@@ -74,10 +78,13 @@ pylock file specification.
7478

7579
.. class:: PackageDirectory
7680

77-
The following exception may be raised by this module:
81+
The following exceptions may be raised by this module:
7882

7983
.. autoexception:: PylockValidationError
8084
:exclude-members: __init__, __new__
8185

8286
.. autoexception:: PylockUnsupportedVersionError
8387
:exclude-members: __init__, __new__
88+
89+
.. autoexception:: PylockSelectError
90+
:exclude-members: __init__, __new__

0 commit comments

Comments
 (0)