From 150eea0703598a3d02c2d679834ee88cb6b63746 Mon Sep 17 00:00:00 2001 From: Stijn Van Campenhout Date: Wed, 18 Sep 2019 07:10:39 +0200 Subject: [PATCH] Cleanup typehints & docstrings --- rmapi/api.py | 9 ++++++--- rmapi/collections.py | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/rmapi/api.py b/rmapi/api.py index 064b2f4..c3d72ce 100644 --- a/rmapi/api.py +++ b/rmapi/api.py @@ -18,7 +18,7 @@ from .const import (RFC3339Nano, log = getLogger("rmapipy.rmapi") -DocOrFolder = TypeVar('A', Document, Folder) +DocOrFolder = TypeVar('DocumentOrFolder', Document, Folder) class Client(object): @@ -296,9 +296,12 @@ class Client(object): """Create a new folder meta object. This needs to be done in 3 steps: - 1. Create an upload request for a new CollectionType meta object + + 1. Create an upload request for a new CollectionType meta object. + 2. Upload a zipfile with a *.content file containing - an empty object + an empty object. + 3. Update the meta object with the new name. Args: diff --git a/rmapi/collections.py b/rmapi/collections.py index 4507ddb..1b98f02 100644 --- a/rmapi/collections.py +++ b/rmapi/collections.py @@ -2,7 +2,7 @@ from .document import Document from .folder import Folder from typing import NoReturn, TypeVar -DocOrFolder = TypeVar('A', Document, Folder) +DocOrFolder = TypeVar('DocumentOrFolder', Document, Folder) class Collection(object):