[openstack-dev] [nova] is it possible to microversion a static class method?

Chris Friesen chris.friesen at windriver.com
Thu Mar 12 18:03:09 UTC 2015


I'm having an issue with microversions.

The api_version() code has a comment saying "This decorator MUST appear first 
(the outermost decorator) on an API method for it to work correctly"

I tried making a microversioned static class method like this:

     @wsgi.Controller.api_version("2.4")  # noqa
     def _my_func(req, foo):

and pycharm highlighted the api_version decorator and complained that "This 
decorator will not receive a callable it may expect; the built-in decorator 
returns a special object."

Is this a spurious warning from pycharm?  The pep8 checks don't complain.

If I don't make it static, then pycharm suggests that the method could be static.


More information about the OpenStack-dev mailing list