Code review comment for lp:~leonardr/lazr.restful/generate-multiversion-operations

Revision history for this message
Brad Crittenden (bac) wrote :

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'
> --- src/lazr/restful/declarations.py 2010-01-20 21:32:53 +0000
+++ src/lazr/restful/declarations.py 2010-01-25 20:02:11 +0000

> + # 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."""

review: Approve (code)

« Back to merge proposal