eric6/QScintilla/Lexers/LexerRuby.py

changeset 8243
cc717c2ae956
parent 7923
91e843545d9a
equal deleted inserted replaced
8242:aa713ac50c0d 8243:cc717c2ae956
4 # 4 #
5 5
6 """ 6 """
7 Module implementing a Ruby lexer with some additional methods. 7 Module implementing a Ruby lexer with some additional methods.
8 """ 8 """
9
10 import contextlib
9 11
10 from PyQt5.Qsci import QsciLexerRuby 12 from PyQt5.Qsci import QsciLexerRuby
11 13
12 from .Lexer import Lexer 14 from .Lexer import Lexer
13 import Preferences 15 import Preferences
34 36
35 def initProperties(self): 37 def initProperties(self):
36 """ 38 """
37 Public slot to initialize the properties. 39 Public slot to initialize the properties.
38 """ 40 """
39 try: 41 with contextlib.suppress(AttributeError):
40 self.setFoldCompact(Preferences.getEditor("AllFoldCompact")) 42 self.setFoldCompact(Preferences.getEditor("AllFoldCompact"))
41 self.setFoldComments(Preferences.getEditor("RubyFoldComment")) 43 self.setFoldComments(Preferences.getEditor("RubyFoldComment"))
42 except AttributeError:
43 pass
44 44
45 def autoCompletionWordSeparators(self): 45 def autoCompletionWordSeparators(self):
46 """ 46 """
47 Public method to return the list of separators for autocompletion. 47 Public method to return the list of separators for autocompletion.
48 48

eric ide

mercurial