example.py:
'''
demo too many ancestors
'''
from flask_security.forms import RegisterForm
from wtforms.fields import TextField
class ExtendedRegisterForm(RegisterForm):
'''An extended register form'''
name = TextField('Name', [])
When I run pylint:
$ pylint -r n example.py
************* Module example
R: 7, 0: Too many ancestors (10/7) (too-many-ancestors)
What does this mean and how can I fix it?
The problem is that you inherit from a class which has itself (too) many ancestors: RegisterForm. In your case, you can't do a lot about this, beside stopping using it which is probably not an option. So you may want to disable this message for this class, eg:
class ExtendedRegisterForm(RegisterForm): # pylint: disable=too-many-ancestors