[openstack-dev] [nova] Questions on pep8 F811 hacking check for microversion

Sean Dague sean at dague.net
Tue Jan 6 13:20:21 UTC 2015

On 01/06/2015 06:25 AM, Chen CH Ji wrote:
> Based on nova-specs api-microversions.rst
> we support following function definition format, but it violate the
> hacking rule pep8 F811 because duplicate function definition
> we should use #noqa for them , but considering microversion may live for
> long time ,
> keep adding #noqa may be a little bit ugly, can anyone suggest a good
> solution for it ? thanks
>>   @api_version(min_version='2.1')
>>   def _version_specific_func(self, req, arg1):
>>      pass
>>   @api_version(min_version='2.5')
>>   def _version_specific_func(self, req, arg1):
>>      pass

Can you show the patch in question? (this is the only one I see -

We knew this was going to be an evolution. I think it was only ever
envisioned that @api_version would be used at the top level dispatch,
not 5 levels of private methods deep. The patch above does something
extremely unexpected, and not what I wanted to see out of this for sure.


Sean Dague

More information about the OpenStack-dev mailing list