"no-member" not triggered for C-extension member but "--unsafe-load-any-extension=y" #9541
Labels
Documentation 📗
Needs triage 📥
Just created, needs acknowledgment, triage, and proper labelling
Question
Question
I do know about the exceptional behavior of PyLint when it comes to c-extensions. I thought I had workaround that but it seems I still misunderstand something.
I expect a
no-membe (E1101)
error at this line (original code):The class
QPalette
is imported correct fromPyQt6
. But the memberWindowText
do not exit. Correct would beQPalette.ColorRole.WindowText
. But PyLint do not see this error.This is the pylint call I do use to test this:
So the question for me and my project is if I can configure PyLint in a way that it will give errors on that example line or if I have to live with it that it does not work with PyQt?
Documentation for future user
Don't know because I do not understand the underlying problem.
Additional context
https://github.com/bit-team/backintime/blob/dev/qt/settingsdialog.py#L2271-L2275
I am aware that PyQt6 is doing this "sip" magic. The Python code is somehow auto-generated based on the C-extension or the original C-code. Don't understand the details. I don't know if there is an official git repo having the Python code in it. But I found on my local system a file named
.../PyQt6/QtGui.pyi
containing theclass QPalette
and inside of it the enumColorRole
.Looks wired.
The text was updated successfully, but these errors were encountered: