Answer the question
In order to leave comments, you need to log in
Why doesn't pylint see classes in modules?
There is the following code:
import sys
from PyQt5.QtWidgets import QApplication, QWidget
from PyQt5.QtGui import QIcon
class Example(QWidget):
def __init__(self):
super().__init__()
self.initUi()
def initUi(self):
self.setGeometry(300,300,300,220)
self.setWindowTitle('Icon')
self.setWindowIcon(QIcon('camera-96.png'))
self.show()
if __name__ == '__main__':
app = QApplication(sys.argv)
ex = Example()
sys.exit(app.exec_())
Answer the question
In order to leave comments, you need to log in
This happens if the package being imported is not in the PATH of the particular interpreter you are using (venv, external....). Pylint sometimes does not see the paths in which these pacts would be included when the script is executed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question