HHousen / lecture2notes

Assert statement used outside of tests BAN-B101
Security
Major
9 months ago4 years old
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
240    self, data, num_proc: int = 1, strict: bool = False
241):
242    if strict:
243        assert (244            self.context.is_initialized
245        ), "strict=True and context is not initialized. Make sure to call 'context.init_state()' before."
246    else: