remove a few unnecessary PyQt workarounds
https://www.riverbankcomputing.com/pipermail/pyqt/2021-October/044314.html
This commit is contained in:
parent
5a055db02e
commit
8cd905a35f
@ -37,10 +37,6 @@ def fix_pyi_types():
|
||||
lines = file.readlines()
|
||||
file.seek(0)
|
||||
for line in lines:
|
||||
# inheriting from the missing sip.sipwrapper definition
|
||||
# causes missing attributes not to be detected, as it's treating
|
||||
# the class as inheriting from Any
|
||||
line = line.replace("PyQt6.sip.wrapper", "object")
|
||||
# # remove blanket getattr in QObject which also causes missing
|
||||
# # attributes not to be detected
|
||||
if "def __getattr__(self, name: str) -> typing.Any" in line:
|
||||
|
@ -42,10 +42,6 @@ def with_fixes_for_qt6(code: str) -> str:
|
||||
"QAction.PreferencesRole", "QAction.MenuRole.PreferencesRole"
|
||||
)
|
||||
line = line.replace("QAction.AboutRole", "QAction.MenuRole.AboutRole")
|
||||
line = line.replace(
|
||||
"QComboBox.AdjustToMinimumContentsLength",
|
||||
"QComboBox.SizeAdjustPolicy.AdjustToMinimumContentsLength",
|
||||
)
|
||||
outlines.append(line)
|
||||
return "\n".join(outlines)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user