Skip to content

Commit a8282f9

Browse files
committed
Improve docstring refs to types from route methods.
1 parent 8ffda74 commit a8282f9

File tree

3 files changed

+28
-25
lines changed

3 files changed

+28
-25
lines changed

dropbox/base.py

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,9 @@ def files_delete(self,
217217
Delete the file or folder at a given path. If the path is a folder, all
218218
its contents will be deleted too. A successful response indicates that
219219
the file or folder was deleted. The returned metadata will be the
220-
corresponding :class:`FileMetadata` or :class:`FolderMetadata` for the
221-
item at time of deletion, and not a :class:`DeletedMetadata` object.
220+
corresponding :class:`dropbox.files.FileMetadata` or
221+
:class:`dropbox.files.FolderMetadata` for the item at time of deletion,
222+
and not a :class:`dropbox.files.DeletedMetadata` object.
222223
223224
:param str path: Path in the user's Dropbox to delete.
224225
:rtype: :class:`dropbox.files.Metadata`
@@ -309,9 +310,10 @@ def files_get_metadata(self,
309310
:param str path: The path of a file or folder on Dropbox.
310311
:param bool include_media_info: If true, ``FileMetadata.media_info`` is
311312
set for photo and video.
312-
:param bool include_deleted: If true, :class:`DeletedMetadata` will be
313-
returned for deleted file or folder, otherwise
314-
``LookupError.not_found`` will be returned.
313+
:param bool include_deleted: If true,
314+
:class:`dropbox.files.DeletedMetadata` will be returned for deleted
315+
file or folder, otherwise ``LookupError.not_found`` will be
316+
returned.
315317
:param bool include_has_explicit_shared_members: If true, the results
316318
will include a flag for each file indicating whether or not that
317319
file has any explicit members.
@@ -1392,13 +1394,13 @@ def sharing_create_shared_link(self,
13921394
"""
13931395
Create a shared link. If a shared link already exists for the given
13941396
path, that link is returned. Note that in the returned
1395-
:class:`PathLinkMetadata`, the ``PathLinkMetadata.url`` field is the
1396-
shortened URL if ``CreateSharedLinkArg.short_url`` argument is set to
1397-
``True``. Previously, it was technically possible to break a shared link
1398-
by moving or renaming the corresponding file or folder. In the future,
1399-
this will no longer be the case, so your app shouldn't rely on this
1400-
behavior. Instead, if your app needs to revoke a shared link, use
1401-
:meth:`sharing_revoke_shared_link`.
1397+
:class:`dropbox.sharing.PathLinkMetadata`, the ``PathLinkMetadata.url``
1398+
field is the shortened URL if ``CreateSharedLinkArg.short_url`` argument
1399+
is set to ``True``. Previously, it was technically possible to break a
1400+
shared link by moving or renaming the corresponding file or folder. In
1401+
the future, this will no longer be the case, so your app shouldn't rely
1402+
on this behavior. Instead, if your app needs to revoke a shared link,
1403+
use :meth:`sharing_revoke_shared_link`.
14021404
14031405
:param str path: The path to share.
14041406
:param bool short_url: Whether to return a shortened URL.
@@ -1635,13 +1637,13 @@ def sharing_get_shared_link_metadata(self,
16351637
def sharing_get_shared_links(self,
16361638
path=None):
16371639
"""
1638-
Returns a list of :class:`LinkMetadata` objects for this user, including
1639-
collection links. If no path is given or the path is empty, returns a
1640-
list of all shared links for the current user, including collection
1641-
links. If a non-empty path is given, returns a list of all shared links
1642-
that allow access to the given path. Collection links are never
1643-
returned in this case. Note that the url field in the response is never
1644-
the shortened URL.
1640+
Returns a list of :class:`dropbox.sharing.LinkMetadata` objects for this
1641+
user, including collection links. If no path is given or the path is
1642+
empty, returns a list of all shared links for the current user,
1643+
including collection links. If a non-empty path is given, returns a list
1644+
of all shared links that allow access to the given path. Collection
1645+
links are never returned in this case. Note that the url field in the
1646+
response is never the shortened URL.
16451647
16461648
:param Nullable path: See :meth:`sharing_get_shared_links` description.
16471649
:rtype: :class:`dropbox.sharing.GetSharedLinksResult`
@@ -1996,9 +1998,10 @@ def sharing_modify_shared_link_settings(self,
19961998
with the shared links policy of the team or the shared folder (in case
19971999
the linked file is part of a shared folder) then the
19982000
``LinkPermissions.resolved_visibility`` of the returned
1999-
:class:`SharedLinkMetadata` will reflect the actual visibility of the
2000-
shared link and the ``LinkPermissions.requested_visibility`` will
2001-
reflect the requested visibility.
2001+
:class:`dropbox.sharing.SharedLinkMetadata` will reflect the actual
2002+
visibility of the shared link and the
2003+
``LinkPermissions.requested_visibility`` will reflect the requested
2004+
visibility.
20022005
20032006
:param str url: URL of the shared link to change its settings
20042007
:param settings: Set of settings for the shared link.

generate_base_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ def main():
6969
o = subprocess.check_output(
7070
(['python', '-m', 'stone.cli', 'python_client', dropbox_pkg_path] +
7171
specs + ['-a', 'host', '-a', 'style', '-b', 'team'] +
72-
['--', '-m', 'base', '-c', 'DropboxBase']),
72+
['--', '-m', 'base', '-c', 'DropboxBase', '-t', 'dropbox']),
7373
cwd=stone_path)
7474
if o:
7575
print('Output:', o)
7676
o = subprocess.check_output(
7777
(['python', '-m', 'stone.cli', 'python_client', dropbox_pkg_path] +
7878
specs + ['-a', 'host', '-a', 'style', '-w', 'team'] +
79-
['--', '-m', 'base_team', '-c', 'DropboxTeamBase']),
79+
['--', '-m', 'base_team', '-c', 'DropboxTeamBase', '-t', 'dropbox']),
8080
cwd=stone_path)
8181
if o:
8282
print('Output:', o)

stone

0 commit comments

Comments
 (0)