Skip to content

Commit 306f957

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent dd0f762 commit 306f957

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

src/pytestqt/exceptions.py

-1
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,3 @@ class CallbackCalledTwiceError(Exception):
138138
139139
Access via ``qtbot.CallbackCalledTwiceError``.
140140
"""
141-

src/pytestqt/wait_signal.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import TYPE_CHECKING
22

33
from pytestqt.exceptions import SignalEmittedError
4-
from pytestqt.utils import SignalAndArgs as SignalAndArgs
4+
55
if TYPE_CHECKING:
66
from pytestqt.wait_signal_impl import (
77
SignalBlocker as SignalBlocker,
@@ -17,6 +17,7 @@ def __getattr__(name: str) -> type:
1717
MultiSignalBlocker,
1818
CallbackBlocker,
1919
)
20+
2021
if name == "SignalBlocker":
2122
return SignalBlocker
2223
elif name == "MultiSignalBlocker":

src/pytestqt/wait_signal_impl.py

+12-4
Original file line numberDiff line numberDiff line change
@@ -310,14 +310,22 @@ def __init__(self, timeout=5000, raising=True, check_params_cbs=None, order="non
310310
super().__init__(timeout, raising=raising)
311311
self._order = order
312312
self._check_params_callbacks = check_params_cbs
313-
self._signals_emitted = [] # list of booleans, indicates whether the signal was already emitted
314-
self._signals_map = {} # maps from a unique Signal to a list of indices where to expect signal instance emits
315-
self._signals = [] # list of all Signals (for compatibility with _AbstractSignalBlocker)
313+
self._signals_emitted = (
314+
[]
315+
) # list of booleans, indicates whether the signal was already emitted
316+
self._signals_map = (
317+
{}
318+
) # maps from a unique Signal to a list of indices where to expect signal instance emits
319+
self._signals = (
320+
[]
321+
) # list of all Signals (for compatibility with _AbstractSignalBlocker)
316322
self._slots = [] # list of slot functions
317323
self._signal_expected_index = 0 # only used when forcing order
318324
self._strict_order_violated = False
319325
self._actual_signal_and_args_at_violation = None
320-
self._signal_names = {} # maps from the unique Signal to the name of the signal (as string)
326+
self._signal_names = (
327+
{}
328+
) # maps from the unique Signal to the name of the signal (as string)
321329
self.all_signals_and_args = [] # list of SignalAndArgs instances
322330

323331
def add_signals(self, signals):

0 commit comments

Comments
 (0)