Closed as not planned
Description
This issue affects unannotated code. Here's some example code from https://github.com/zulip/zulip/blob/master/zerver/lib/test_helpers.py#L47:
@contextmanager
def simulated_queue_client(client):
real_SimpleQueueClient = queue_processors.SimpleQueueClient
queue_processors.SimpleQueueClient = client
yield
queue_processors.SimpleQueueClient = real_SimpleQueueClient
(There's a similar issue with replacing a function rather than a class; and an example a few lines down in the Zulip codebase)