I'm writing pyside2 code, using the QAbstractItemModel class. I've
subclassed setData. The pyside2 doc says to explicitly emit the changedData
signal if this is done.
QAbstractItemModel — Qt for Python
<https://doc.qt.io/qtforpython-5/PySide2/QtCore/QAbstractItemModel.html#subclassing>

pylint does not see the emit() method and the error needs to be suppressed:

self.dataChanged.emit(index, index) # pylint: disable=E1101

{
"resource": "xxx/src/main/python/models/mdl_abstbl_banktran.py",
"owner": "python",
"code": "no-member",
"severity": 8,
"message": "Method 'dataChanged' has no 'emit' member",
"source": "pylint",
"startLineNumber": 451,
"startColumn": 17,
"endLineNumber": 451,
"endColumn": 17
}

In a message with pyside2 support, they think the emit() member should be
findable, being written here
https://code.qt.io/cgit/pyside/pyside-setup.git/tree/sources/pyside6/libpyside/pysidesignal.cpp

Is this an artifact of the python/c++ nature of the pyside implementation?

Thanks,
Ed
_______________________________________________
code-quality mailing list -- code-quality@python.org
To unsubscribe send an email to code-quality-le...@python.org
https://mail.python.org/mailman3/lists/code-quality.python.org/
Member address: arch...@mail-archive.com

Reply via email to