diff -r 59a9a658618c -r 93b8a353c4bf eric6/Plugins/PluginSyntaxChecker.py --- a/eric6/Plugins/PluginSyntaxChecker.py Wed Apr 14 19:38:19 2021 +0200 +++ b/eric6/Plugins/PluginSyntaxChecker.py Wed Apr 14 19:59:16 2021 +0200 @@ -8,6 +8,7 @@ """ import os +import contextlib from PyQt5.QtCore import QObject @@ -339,10 +340,8 @@ @param editor reference to the editor (QScintilla.Editor) """ - try: + with contextlib.suppress(ValueError): self.__editors.remove(editor) - except ValueError: - pass def __editorShowMenu(self, menuName, menu, editor): """