Skip to content

Commit 0dfce92

Browse files
committed
Bump dependencies and add manual type-stubs for PyQt6.
1 parent 83c4319 commit 0dfce92

40 files changed

Lines changed: 44101 additions & 170 deletions

games/stalkeranomaly/XRSave.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
import struct
33
from datetime import datetime
44
from pathlib import Path
5-
from typing import BinaryIO, Optional, cast
5+
from typing import BinaryIO, Optional
66

7-
import lzokay # pyright: ignore[reportMissingTypeStubs]
7+
import lzokay
88

99
from .XRIO import XRReader, XRStream
1010
from .XRObject import XRCreatureActor, XRFlag
@@ -108,14 +108,7 @@ def readFile(self, file: BinaryIO) -> Optional[XRStream]:
108108
if (start == -1) and (version >= 6):
109109
file.seek(12)
110110
data = file.read(size - 12)
111-
return XRStream(
112-
cast(
113-
bytes,
114-
lzokay.decompress( # pyright: ignore[reportUnknownMemberType]
115-
data, source
116-
),
117-
)
118-
)
111+
return XRStream(lzokay.decompress(data, source))
119112

120113
return None
121114

plugin-requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
psutil==5.8.0
1+
psutil==7.2.2
22
vdf==3.4
3-
lzokay==1.1.5
4-
pyyaml==6.0.2
3+
lzokay==2.1.0
4+
pyyaml==6.0.3

poetry.lock

Lines changed: 195 additions & 145 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,25 @@ description = ""
77
authors = []
88
license = "MIT"
99
readme = "README.md"
10-
requires-python = ">=3.12,<4.0"
10+
requires-python = ">=3.13,<4.0"
1111
dynamic = ["dependencies"]
1212

1313
[tool.poetry]
1414
package-mode = false
1515

1616
[tool.poetry.dependencies]
17-
psutil = "^5.8.0"
18-
vdf = "3.4"
19-
lzokay = "1.1.5"
20-
pyqt6 = "6.7.0"
21-
pyyaml = "^6.0.2"
17+
psutil = "^7.2.2"
18+
vdf = "^3.4"
19+
lzokay = "^2.1.0"
20+
pyqt6 = "6.11.0"
21+
pyyaml = "^6.0.3"
2222

2323
[tool.poetry.group.dev.dependencies]
2424
mobase-stubs = "^2.5.2"
25-
pyqt6 = "^6.7.0"
26-
pyright = "^1.1.402"
27-
ruff = "^0.12.2"
28-
types-psutil = "<6"
29-
poethepoet = "^0.36.0"
25+
pyright = "^1.1.409"
26+
ruff = "^0.15.14"
27+
types-psutil = "^7.2.2.20260518"
28+
poethepoet = "^0.46.0"
3029

3130
[build-system]
3231
requires = ["poetry-core (>=2.0)"]
@@ -42,6 +41,9 @@ lint-pyright = "pyright ."
4241
lint.sequence = ["lint-ruff", "lint-ruff-format", "lint-pyright"]
4342
lint.ignore_fail = "return_non_zero"
4443

44+
[tool.ruff]
45+
extend-exclude = ["typings"]
46+
4547
[tool.ruff.lint]
4648
extend-select = ["B", "Q", "I"]
4749

@@ -52,7 +54,7 @@ extend-immutable-calls = ["PyQt6.QtCore.QModelIndex"]
5254
known-first-party = ["mobase"]
5355

5456
[tool.pyright]
55-
exclude = ["lib", "**/.*", "venv"]
57+
exclude = ["lib", "**/.*", "venv", "typings"]
5658
typeCheckingMode = "strict"
5759
reportMissingTypeStubs = true
5860
reportMissingModuleSource = false

typings/PyQt6/QAxContainer.pyi

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# The PEP 484 type hints stub file for the QAxContainer module.
2+
#
3+
# Generated by SIP 6.15.3
4+
#
5+
# Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
6+
#
7+
# This file is part of PyQt6.
8+
#
9+
# This file may be used under the terms of the GNU General Public License
10+
# version 3.0 as published by the Free Software Foundation and appearing in
11+
# the file LICENSE included in the packaging of this file. Please review the
12+
# following information to ensure the GNU General Public License version 3.0
13+
# requirements will be met: http://www.gnu.org/copyleft/gpl.html.
14+
#
15+
# If you do not wish to use this file under the terms of the GPL version 3.0
16+
# then you may purchase a commercial license. For more information contact
17+
# info@riverbankcomputing.com.
18+
#
19+
# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20+
# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21+
22+
23+
import collections, re, typing
24+
25+
try:
26+
from warnings import deprecated
27+
except ImportError:
28+
pass
29+
30+
import PyQt6.sip
31+
32+
from PyQt6 import QtCore
33+
from PyQt6 import QtGui
34+
from PyQt6 import QtWidgets
35+
36+
# Support for QDate, QDateTime and QTime.
37+
import datetime
38+
39+
# Convenient type aliases.
40+
PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal]
41+
PYQT_SLOT = typing.Union[collections.abc.Callable[..., Any], QtCore.pyqtBoundSignal]
42+
43+
44+
class QAxBase(PyQt6.sip.simplewrapper):
45+
46+
@typing.overload
47+
def __init__(self) -> None: ...
48+
@typing.overload
49+
def __init__(self, a0: 'QAxBase') -> None: ...
50+
51+
def setClassContext(self, classContext: int) -> None: ...
52+
def classContext(self) -> int: ...
53+
def disableEventSink(self) -> None: ...
54+
def disableClassInfo(self) -> None: ...
55+
def disableMetaObject(self) -> None: ...
56+
def setControl(self, a0: str|None) -> bool: ...
57+
def clear(self) -> None: ...
58+
def asVariant(self) -> typing.Any: ...
59+
def verbs(self) -> list[str]: ...
60+
def isNull(self) -> bool: ...
61+
def setPropertyWritable(self, a0: str, a1: bool) -> None: ...
62+
def propertyWritable(self, a0: str) -> bool: ...
63+
def generateDocumentation(self) -> str: ...
64+
def setPropertyBag(self, a0: dict[str|None, typing.Any]) -> None: ...
65+
def propertyBag(self) -> dict[str, typing.Any]: ...
66+
@typing.overload
67+
def querySubObject(self, a0: str, a1: collections.abc.Iterable[typing.Any]) -> 'QAxObject|None': ...
68+
@typing.overload
69+
def querySubObject(self, a0: str, value1: typing.Any = ..., value2: typing.Any = ..., value3: typing.Any = ..., value4: typing.Any = ..., value5: typing.Any = ..., value6: typing.Any = ..., value7: typing.Any = ..., value8: typing.Any = ...) -> 'QAxObject|None': ...
70+
@typing.overload
71+
def dynamicCall(self, a0: str, a1: collections.abc.Iterable[typing.Any]) -> typing.Any: ...
72+
@typing.overload
73+
def dynamicCall(self, a0: str, value1: typing.Any = ..., value2: typing.Any = ..., value3: typing.Any = ..., value4: typing.Any = ..., value5: typing.Any = ..., value6: typing.Any = ..., value7: typing.Any = ..., value8: typing.Any = ...) -> typing.Any: ...
74+
def control(self) -> str: ...
75+
76+
77+
class QAxObjectInterface(PyQt6.sip.simplewrapper):
78+
79+
@typing.overload
80+
def __init__(self) -> None: ...
81+
@typing.overload
82+
def __init__(self, a0: 'QAxObjectInterface') -> None: ...
83+
84+
def resetControl(self) -> None: ...
85+
def setControl(self, c: str|None) -> bool: ...
86+
def control(self) -> str: ...
87+
def setClassContext(self, classContext: int) -> None: ...
88+
def classContext(self) -> int: ...
89+
90+
91+
class QAxBaseObject(QtCore.QObject, QAxObjectInterface):
92+
93+
def __init__(self) -> None: ...
94+
95+
signal: typing.ClassVar[QtCore.pyqtSignal]
96+
propertyChanged: typing.ClassVar[QtCore.pyqtSignal]
97+
exception: typing.ClassVar[QtCore.pyqtSignal]
98+
99+
100+
class QAxObject(QAxBaseObject, QAxBase):
101+
102+
@typing.overload
103+
def __init__(self, parent: QtCore.QObject|None = ...) -> None: ...
104+
@typing.overload
105+
def __init__(self, a0: str|None, parent: QtCore.QObject|None = ...) -> None: ...
106+
107+
def connectNotify(self, a0: QtCore.QMetaMethod) -> None: ...
108+
def doVerb(self, a0: str|None) -> bool: ...
109+
def clear(self) -> None: ...
110+
def resetControl(self) -> None: ...
111+
def setControl(self, c: str|None) -> bool: ...
112+
def control(self) -> str: ...
113+
def setClassContext(self, classContext: int) -> None: ...
114+
def classContext(self) -> int: ...
115+
116+
117+
class QAxBaseWidget(QtWidgets.QWidget, QAxObjectInterface):
118+
119+
def __init__(self) -> None: ...
120+
121+
signal: typing.ClassVar[QtCore.pyqtSignal]
122+
propertyChanged: typing.ClassVar[QtCore.pyqtSignal]
123+
exception: typing.ClassVar[QtCore.pyqtSignal]
124+
125+
126+
class QAxWidget(QAxBaseWidget, QAxBase):
127+
128+
@typing.overload
129+
def __init__(self, parent: QtWidgets.QWidget|None = ..., flags: QtCore.Qt.WindowType = ...) -> None: ...
130+
@typing.overload
131+
def __init__(self, a0: str|None, parent: QtWidgets.QWidget|None = ..., flags: QtCore.Qt.WindowType = ...) -> None: ...
132+
133+
def connectNotify(self, a0: QtCore.QMetaMethod) -> None: ...
134+
def translateKeyEvent(self, a0: int, a1: int) -> bool: ...
135+
def resizeEvent(self, a0: QtGui.QResizeEvent|None) -> None: ...
136+
def changeEvent(self, a0: QtCore.QEvent|None) -> None: ...
137+
@typing.overload
138+
def createHostWindow(self, a0: bool) -> bool: ...
139+
@typing.overload
140+
def createHostWindow(self, a0: bool, a1: QtCore.QByteArray|bytes|bytearray|memoryview) -> bool: ...
141+
def minimumSizeHint(self) -> QtCore.QSize: ...
142+
def sizeHint(self) -> QtCore.QSize: ...
143+
def doVerb(self, a0: str|None) -> bool: ...
144+
def clear(self) -> None: ...
145+
def resetControl(self) -> None: ...
146+
def setControl(self, c: str|None) -> bool: ...
147+
def control(self) -> str: ...
148+
def setClassContext(self, classContext: int) -> None: ...
149+
def classContext(self) -> int: ...

0 commit comments

Comments
 (0)