Remove assert statement from non-test files

This commit is contained in:
deepsource-autofix[bot] 2022-09-07 16:01:32 +00:00 committed by GitHub
parent de359b64bb
commit a4cdaf0bed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,7 +29,8 @@ from .modules.utils import buglog
class RunAsync(threading.Thread):
def __init__(self, task_func, callback=None, *args, **kwargs):
self.source_id = None
assert threading.current_thread() is threading.main_thread()
if threading.current_thread() is not threading.main_thread():
raise AssertionError
super(RunAsync, self).__init__(
target=self.target, args=args, kwargs=kwargs)