Run pylint on code using any member of psycopg2.error. For example:
import psycopg2.errors
raise psycopg2.errors.InvalidSqlStatementName()
no-member(E1101): Module 'psycopg2.errors' has no 'XXX' member
No issue
According to a comment in psycopg2/errors.py, the exceptions are injected into the module by the C extension.
pylint 2.3.1
astroid 2.2.5
Python 3.7.3 (default, Mar 27 2019, 09:52:24)
[GCC 7.3.0]
Well there is not much pylint can do about this. If these are injected automatically, especially from a C extension, I'd recommend ignoring the module entirely with --ignored-modules=psycopg2.errors.
Most helpful comment
Well there is not much
pylintcan do about this. If these are injected automatically, especially from a C extension, I'd recommend ignoring the module entirely with--ignored-modules=psycopg2.errors.