def cast(cls, some_a: ThreadedRunner): assert isinstance(some_a, ThreadedRunner) some_a.__class__ = cls assert isinstance(some_a, ThreadedRunnerWrapper) some_a.host = 'localhost' some_a.port = 8080 return some_a
def dash_thread_server(): """Start a local dash server in a new thread""" with ThreadedRunner() as starter: yield starter