pep8 class extensions defined but not used

Bug #1549999 reported by cdoan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
CloudCafe
Invalid
Undecided
Jose Idar

Bug Description

defined

from cloudcafe.openstackcli.novacli.models.extensions import extensions

but extensions is not used in

cloudcafe/openstackcli/novacli/models/responses.py

Revision history for this message
Jose Idar (jose-idar) wrote :

'extensions' _is_ used by the class that ServerResponse inherits from. Removing it would break the model.

Changed in cloudcafe:
assignee: nobody → Jose Idar (jose-idar)
status: New → Invalid
Revision history for this message
Jose Idar (jose-idar) wrote :

Comment from related PR, copied here for clarity:

This IS actually being used by the ServerResponse model below, via the metaclass that defines it (inherited via KeyValuePrettyTableWithHeaders).
The implementation is kind of weird, but basically the class expects a variable named 'extensions' to exist within scope of the module (global), which it then uses to 'deserialize' all the extra attributes that may be present, beyond the base attributes listed in the model.
That list has to be inherited so that it can be auto-populated by the metaclass registration method.
A nice refactor would be to somehow get rid of the need for a globally scoped variable, but it does work as is.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.