Skip to content

Commit de182f2

Browse files
revert: Intentionally failing ci test passed
1 parent 39f7823 commit de182f2

File tree

1 file changed

+47
-46
lines changed

1 file changed

+47
-46
lines changed

src/thread/thread.py

Lines changed: 47 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -38,39 +38,40 @@ class ParallelProcessing: ...
3838
Threads: set['Thread'] = set()
3939

4040

41-
"""
41+
class Thread(threading.Thread, Generic[_Target_P, _Target_T]):
42+
"""
4243
Wraps python's `threading.Thread` class
4344
---------------------------------------
4445
4546
Type-Safe and provides more functionality on top
4647
"""
4748

48-
status: ThreadStatus
49-
hooks: List[HookFunction]
50-
_returned_value: Data_Out
51-
52-
errors: List[Exception]
53-
ignore_errors: Sequence[type[Exception]]
54-
suppress_errors: bool
55-
56-
# threading.Thread stuff
57-
_initialized: bool
58-
_run: Callable
59-
60-
def __init__(
61-
self,
62-
target: TargetFunction[_Target_P, _Target_T],
63-
args: Sequence[Data_In] = (),
64-
kwargs: Mapping[str, Data_In] = {},
65-
ignore_errors: Sequence[type[Exception]] = (),
66-
suppress_errors: bool = False,
67-
name: Optional[str] = None,
68-
daemon: bool = False,
69-
group=None,
70-
*overflow_args: Overflow_In,
71-
**overflow_kwargs: Overflow_In,
72-
) -> None:
73-
"""
49+
status: ThreadStatus
50+
hooks: List[HookFunction]
51+
_returned_value: Data_Out
52+
53+
errors: List[Exception]
54+
ignore_errors: Sequence[type[Exception]]
55+
suppress_errors: bool
56+
57+
# threading.Thread stuff
58+
_initialized: bool
59+
_run: Callable
60+
61+
def __init__(
62+
self,
63+
target: TargetFunction[_Target_P, _Target_T],
64+
args: Sequence[Data_In] = (),
65+
kwargs: Mapping[str, Data_In] = {},
66+
ignore_errors: Sequence[type[Exception]] = (),
67+
suppress_errors: bool = False,
68+
name: Optional[str] = None,
69+
daemon: bool = False,
70+
group=None,
71+
*overflow_args: Overflow_In,
72+
**overflow_kwargs: Overflow_In,
73+
) -> None:
74+
"""
7475
Initializes a thread
7576
7677
Parameters
@@ -86,25 +87,25 @@ def __init__(
8687
:param *: These are arguments parsed to `threading.Thread`
8788
:param **: These are arguments parsed to `thread.Thread`
8889
"""
89-
_target = self._wrap_target(target)
90-
self._returned_value = None
91-
self.status = 'Idle'
92-
self.hooks = []
93-
94-
self.errors = []
95-
self.ignore_errors = ignore_errors
96-
self.suppress_errors = suppress_errors
97-
98-
super().__init__(
99-
target=_target,
100-
args=args,
101-
kwargs=kwargs,
102-
name=name,
103-
daemon=daemon,
104-
group=group,
105-
*overflow_args,
106-
**overflow_kwargs,
107-
)
90+
_target = self._wrap_target(target)
91+
self._returned_value = None
92+
self.status = 'Idle'
93+
self.hooks = []
94+
95+
self.errors = []
96+
self.ignore_errors = ignore_errors
97+
self.suppress_errors = suppress_errors
98+
99+
super().__init__(
100+
target=_target,
101+
args=args,
102+
kwargs=kwargs,
103+
name=name,
104+
daemon=daemon,
105+
group=group,
106+
*overflow_args,
107+
**overflow_kwargs,
108+
)
108109

109110
def _wrap_target(
110111
self, target: TargetFunction[_Target_P, _Target_T]

0 commit comments

Comments
 (0)