diff --git a/qt/aqt/editor.py b/qt/aqt/editor.py index 120a31cf9..618140a42 100644 --- a/qt/aqt/editor.py +++ b/qt/aqt/editor.py @@ -536,7 +536,7 @@ class Editor: if html.find(">") > -1: # filter html through beautifulsoup so we can strip out things like a # leading - with warnings.catch_warnings() as w: + with warnings.catch_warnings(): warnings.simplefilter("ignore", UserWarning) html = str(BeautifulSoup(html, "html.parser")) self.note.fields[field] = html