diff --git a/zerver/lib/json_encoder_for_html.py b/zerver/lib/json_encoder_for_html.py
index 8aac8809ca..44cc1f4530 100644
--- a/zerver/lib/json_encoder_for_html.py
+++ b/zerver/lib/json_encoder_for_html.py
@@ -1,4 +1,5 @@
import json
+from typing import Any, Dict, Iterator, Optional
# Taken from
# https://github.com/simplejson/simplejson/blob/8edc82afcf6f7512b05fba32baa536fe756bd273/simplejson/encoder.py#L378-L402
@@ -11,15 +12,13 @@ class JSONEncoderForHTML(json.JSONEncoder):
within