[PyQt] PyQt and pylint with "no-name-in-module"

Gottfried Müller gottfried.mueller at gmx.de
Sun Jul 2 14:28:10 BST 2017


Hello,

I like pylint and I get always the pylint message "no-name-in-module" if 
I am using PyQt. So I write always a module like this:

# MyPyQt.py
# -*- coding: utf-8 -*-
# pylint: disable=missing-docstring
# pylint: disable=no-name-in-module
# pylint: disable=unused-import

from PyQt5.QtWidgets import (QApplication, QWidget, QVBoxLayout, 
QPushButton)

In my application I use the following line:

from MyPyQt import (QApplication, QWidget, QVBoxLayout, QPushButton)

So I prevent the pylint message "no-name-in-module" for the PyQt 
framework. What is the reason for this behaviour of pylint to the PyQt 
system? And is there another way to prevent this? I could not find any 
information in the documentation http://pyqt.sourceforge.net/Docs/PyQt5. 
It would be helpful.

Gottfried







More information about the PyQt mailing list