> + # It's possible that call_with, operation_parameters, and/or
> + # operation_returns_* weren't used.
> + annotations.setdefault('call_with', {})
> + annotations.setdefault('params', {})
> + annotations.setdefault('return_type', None)
> +
> + # Make sure that all parameters exists and that we miss none.
typo: exist
> @@ -495,6 +521,10 @@
> # new dict is empty rather than copying the old annotations
> annotations.push(self.version, True)
>
> + # We need to set a special 'type' so that lazr.restful can
> + # easily distinguish a method that's not present in the latest
> + # version from a method that was incompletely annotated.
> + annotations['type'] = 'removed_operation'
Use REMOVED_OPERATION_TYPE?
> class export_operation_as(_method_annotator):
> """Decorator specifying the name to export the method as."""
Hi Leonard,
The branch is really interesting and the tests are incredibly clear and well-written. I've only got two little issues.
--Brad
> === modified file 'src/lazr/ restful/ declarations. py' restful/ declarations. py 2010-01-20 21:32:53 +0000 restful/ declarations. py 2010-01-25 20:02:11 +0000
> --- src/lazr/
+++ src/lazr/
> + # It's possible that call_with, operation_ parameters, and/or setdefault( 'call_with' , {}) setdefault( 'params' , {}) setdefault( 'return_ type', None)
> + # operation_returns_* weren't used.
> + annotations.
> + annotations.
> + annotations.
> +
> + # Make sure that all parameters exists and that we miss none.
typo: exist
> @@ -495,6 +521,10 @@ push(self. version, True)
> # new dict is empty rather than copying the old annotations
> annotations.
>
> + # We need to set a special 'type' so that lazr.restful can
> + # easily distinguish a method that's not present in the latest
> + # version from a method that was incompletely annotated.
> + annotations['type'] = 'removed_operation'
Use REMOVED_ OPERATION_ TYPE?
> class export_ operation_ as(_method_ annotator) :
> """Decorator specifying the name to export the method as."""