Python shows error: "use of super on old style class"


#1

This is not really a show stopper but no one wants to see error marks on their code.

I have a flask app set up as follows:

- manage.py
- config.py
- requirements.txt
+ app
     -__init__.py
     - models.py
     - modelviews.py
     + main_bluprint
          - __init__.py
          - view.py
     + other_bluprint
          - __init__.py
     + templates
     + static

Inside the following class (in modelviews.py) I get an error (use of super on old style class) on the def: scaffold_form(self)

class EmployeeAdmin(ModelView):

x   def: scaffold_form(self):
        form_class = super(EmployeeAdmin, self).scaffold_form()

I have even tried adding a setup.py to the mix but still the errors persist.

I did some research and found that the error is caused by pylint when the module with the base class is imported from another package. What am I missing?


#2

Thanks a lot for reporting this. I have notified the IDE team to see what the underlying issue is.


#3

Hi. We’re going to allow users to select which python version to use with pylint and will update pylint. That should help with issues like this. Other than that you can try Cloud9 > Preferences > Project Settings > Hints & Warnings and disable this specific warning using the “Ignore Messages” feature.