Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make pylint recognize twisted and ephem members?

I very much like having pylint tell me if I'm using a non-existent member. However, my new project is using both twisted and the ephem modules, which seem to confuse pylint.

How can I get rid of these (incorrect) pylint warnings without either turning off E1101 in general, and without sprinkling warning removal comments around every relevant call?

E1101:  8,0: Module 'twisted.internet.reactor' has no 'run' member
E1101: 49,25:sunrise_next: Module 'ephem' has no 'Sun' member
E1101: 63,26:sunset_next: Module 'ephem' has no 'Sun' member
like image 481
DonGar Avatar asked Jun 17 '13 07:06

DonGar


1 Answers

The answer is to add a section like the following to your pylintrc with the problematic classes.

# List of classes names for which member attributes should not be checked
# (useful for classes with attributes dynamically set).
ignored-classes=SQLObject,twisted.internet.reactor,ephem
like image 164
DonGar Avatar answered Oct 29 '22 11:10

DonGar