How do I make pylint recognize twisted and ephem members?
Asked Answered
M

1

10

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
Maag answered 17/6, 2013 at 7:18 Comment(1)
I would do here the same answer I've just done on https://mcmap.net/q/1165108/-nose-tools-and-pylint (https://mcmap.net/q/1165108/-nose-tools-and-pylint)Chelyuskin
M
12

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
Maag answered 10/9, 2013 at 7:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.