Skip to content

Commit 2d0adb1

Browse files
committed
move error types to classvars
1 parent 786aa1e commit 2d0adb1

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/pytestqt/qtbot.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -774,12 +774,11 @@ def mousePress(*args, **kwargs):
774774
def mouseRelease(*args, **kwargs):
775775
qt_api.QtTest.QTest.mouseRelease(*args, **kwargs)
776776

777-
778-
# provide easy access to exceptions to qtbot fixtures
779-
QtBot.SignalEmittedError = SignalEmittedError # type: ignore[attr-defined]
780-
QtBot.TimeoutError = TimeoutError # type: ignore[attr-defined]
781-
QtBot.ScreenshotError = ScreenshotError # type: ignore[attr-defined]
782-
QtBot.CallbackCalledTwiceError = CallbackCalledTwiceError # type: ignore[attr-defined]
777+
# provide easy access to exceptions to qtbot fixtures
778+
SignalEmittedError = SignalEmittedError
779+
TimeoutError = TimeoutError
780+
ScreenshotError = ScreenshotError
781+
CallbackCalledTwiceError = CallbackCalledTwiceError
783782

784783

785784
def _add_widget(

0 commit comments

Comments
 (0)