diff --git a/synapse/rest/media/v1/preview_html.py b/synapse/rest/media/v1/preview_html.py
index afe4e29758..516d0434f0 100644
--- a/synapse/rest/media/v1/preview_html.py
+++ b/synapse/rest/media/v1/preview_html.py
@@ -20,7 +20,8 @@ from typing import (
Dict,
Generator,
Iterable,
- List, Optional,
+ List,
+ Optional,
Set,
Union,
)