remove a few unnecessary PyQt workarounds

https://www.riverbankcomputing.com/pipermail/pyqt/2021-October/044314.html
This commit is contained in:
Damien Elmes 2021-10-24 14:24:35 +10:00
parent 5a055db02e
commit 8cd905a35f
2 changed files with 0 additions and 8 deletions

View File

@ -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:

View File

@ -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)