You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's embarrassing for me. I must have checked it wrongly. But anyway, the import seems to load just everything:
fromPyQt5importQt# for the following line to work# Now, `PyQt5.__all__` seems to be populated.fromPyQt5import*print(
set(Qt.__dir__()) == \
set(
sum(
(
m.__dir__()
forn, minsys.modules.items()
ifn.startswith("PyQt5.Qt") andn!="PyQt5.Qt"
),
[],
)
)
)
Does it necessary to get only a version string?
StSav012
changed the title
Odd code found for PyQt5 in tests/conftest.py: always raises an exception
Odd code found for PyQt5 in tests/conftest.py: importing too much?
Dec 16, 2024
I think that's the case. The import is only meant to check that the binding is importable/available and to get the relevant info about the version available. Not totally sure if there is also some other reason why for the PyQt5 case the Qt import is done though 🤔 Is there any other reason to use the from PyQt5 import Qt to get the version @ccordoba12 ?
Shouldn't there be
QtCore
instead of justQt
?qtpy/qtpy/tests/conftest.py
Lines 23 to 27 in cd0b49b
For
PyQt6
, it is so:qtpy/qtpy/tests/conftest.py
Lines 48 to 54 in cd0b49b
The text was updated successfully, but these errors were encountered: