From ef93a20cd62150932bfeeeca6d2e8a8f340d53fd Mon Sep 17 00:00:00 2001 From: yscumc Date: Thu, 18 Sep 2014 17:39:22 -0400 Subject: [PATCH 1/2] Fix typo in docstring Fixed typo: `SuspitiousOperation` -> `SuspiciousOperation` --- versions/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/models.py b/versions/models.py index bc3e913..49886f4 100644 --- a/versions/models.py +++ b/versions/models.py @@ -840,7 +840,7 @@ def clone(self, forced_version_date=None): def at(self, timestamp): """ Force the create date of an object to be at a certain time; This method can be invoked only on a - freshly created Versionable object. It must not have been cloned yet. Raises a SuspitiousOperation + freshly created Versionable object. It must not have been cloned yet. Raises a SuspiciousOperation exception, otherwise. :param timestamp: a datetime.datetime instance """ From 8a959c19146d661d29aa2db3f10b8b3d271f488f Mon Sep 17 00:00:00 2001 From: yscumc Date: Thu, 18 Sep 2014 17:44:39 -0400 Subject: [PATCH 2/2] More docstring fixes --- versions/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/versions/models.py b/versions/models.py index 49886f4..0dca6fe 100644 --- a/versions/models.py +++ b/versions/models.py @@ -760,13 +760,13 @@ def delete(self, using=None): def _delete_at(self, timestamp, using=None): """ - WARNING: This method if only for internal use, it should not be used + WARNING: This method is only for internal use, it should not be used from outside. It is used only in the case when you want to make sure a group of related objects are deleted at the exact same time. - It is certainly not meant to be used for deleting an object and give it + It is certainly not meant to be used for deleting an object and giving it a random deletion date of your liking. """ if self.version_end_date is None: @@ -781,10 +781,10 @@ def is_current(self): def _clone_at(self, timestamp): """ - WARNING: This method if only for internal use, it should not be used + WARNING: This method is only for internal use, it should not be used from outside. - This function is mostly intended for testing, to allow us creating + This function is mostly intended for testing, to allow creating realistic test cases. """ return self.clone(forced_version_date=timestamp)