Skip to content

Commit 68f7d60

Browse files
committed
docs: finish docstrings for upload and download
1 parent c83459d commit 68f7d60

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

pins/boards.py

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,11 +400,35 @@ def pin_download(self, name, version=None, hash=None) -> Sequence[str]:
400400

401401
return [str(Path(fname).absolute())]
402402

403-
def pin_upload(self, paths, name=None, title=None, description=None, metadata=None):
403+
def pin_upload(
404+
self,
405+
paths: "str | list[str]",
406+
name=None,
407+
title=None,
408+
description=None,
409+
metadata=None,
410+
):
404411
"""Write a pin based on paths to one or more files.
405412
406413
This method simply uploads the files given, so they can be downloaded later
407414
using [](`~pins.boards.BaseBoard.pin_download`).
415+
416+
Parameters
417+
----------
418+
paths:
419+
Paths of files to upload. Currently, only uploading a single file
420+
is supported.
421+
name:
422+
Pin name.
423+
title:
424+
A title for the pin; most important for shared boards so that others
425+
can understand what the pin contains. If omitted, a brief description
426+
of the contents will be automatically generated.
427+
description:
428+
A detailed description of the pin contents.
429+
metadata:
430+
A dictionary containing additional metadata to store with the pin.
431+
This gets stored on the Meta.user field.
408432
"""
409433

410434
return self._pin_store(

0 commit comments

Comments
 (0)