I'm slightly unsure of how the generated-members
of pylint works.
Lets say I add the following to .pylintrc
:
[TYPECHECK]
generated-members=commit
It hides the following commit
error:
E1101:Instance of 'scoped_session' has no 'commit' member
However, this hides commit
errors in general, from what I understand. Can I somehow specify the exact class member with generated-members
? For example (pseudo):
[TYPECHECK]
generated-members=sqlalchemy.orm.scoped_session.commit
I had the same problem. The code
db.session.add(item)
db.session.commit()
causes pylint errors:
[pylint] E1101:Instance of 'scoped_session' has no 'add' member
[pylint] E1101:Instance of 'scoped_session' has no 'commit' member
I added the following string in pylintrc
generated-members=db.session.*
and errors disappear.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With