Assert types of parameters of methods of Repository and RepositoryKey

This commit is contained in:
Vincent Jacques
2012-05-27 15:59:49 +01:00
parent 49d86183a9
commit c4bebd9a11
6 changed files with 323 additions and 219 deletions
+4
View File
@@ -51,6 +51,10 @@ class RepositoryKey( object ):
)
def edit( self, title = DefaultValueForOptionalParameters, key = DefaultValueForOptionalParameters ):
if title is not DefaultValueForOptionalParameters:
assert isinstance( title, ( str, unicode ) ), title
if key is not DefaultValueForOptionalParameters:
assert isinstance( key, ( str, unicode ) ), key
post_parameters = {
}
if title is not DefaultValueForOptionalParameters: