eric6/Plugins/PluginSyntaxChecker.py

changeset 8240
93b8a353c4bf
parent 8222
5994b80b8760
equal deleted inserted replaced
8239:59a9a658618c 8240:93b8a353c4bf
6 """ 6 """
7 Module implementing the Syntax Checker plugin. 7 Module implementing the Syntax Checker plugin.
8 """ 8 """
9 9
10 import os 10 import os
11 import contextlib
11 12
12 from PyQt5.QtCore import QObject 13 from PyQt5.QtCore import QObject
13 14
14 from E5Gui.E5Action import E5Action 15 from E5Gui.E5Action import E5Action
15 from E5Gui.E5Application import e5App 16 from E5Gui.E5Application import e5App
337 """ 338 """
338 Private slot called, when an editor was closed. 339 Private slot called, when an editor was closed.
339 340
340 @param editor reference to the editor (QScintilla.Editor) 341 @param editor reference to the editor (QScintilla.Editor)
341 """ 342 """
342 try: 343 with contextlib.suppress(ValueError):
343 self.__editors.remove(editor) 344 self.__editors.remove(editor)
344 except ValueError:
345 pass
346 345
347 def __editorShowMenu(self, menuName, menu, editor): 346 def __editorShowMenu(self, menuName, menu, editor):
348 """ 347 """
349 Private slot called, when the the editor context menu or a submenu is 348 Private slot called, when the the editor context menu or a submenu is
350 about to be shown. 349 about to be shown.

eric ide

mercurial