src/eric7/QScintilla/MiniEditor.py

branch
eric7
changeset 10180
3a595df36c9a
parent 10069
435cc5875135
child 10373
093dcebe5ecb
equal deleted inserted replaced
10179:c2125fcab4b8 10180:3a595df36c9a
3891 @return language of the editor 3891 @return language of the editor
3892 @rtype str 3892 @rtype str
3893 """ 3893 """
3894 if self.apiLanguage == "Guessed" or self.apiLanguage.startswith("Pygments|"): 3894 if self.apiLanguage == "Guessed" or self.apiLanguage.startswith("Pygments|"):
3895 lang = self.lexer_.name() 3895 lang = self.lexer_.name()
3896 if normalized: # __IGNORE_WARNING_Y102__ 3896 if normalized and lang in ("Python 2.x", "Python"):
3897 # adjust some Pygments lexer names 3897 # adjust some Pygments lexer names
3898 if lang in ("Python 2.x", "Python"): 3898 lang = "Python3"
3899 lang = "Python3"
3900 3899
3901 else: 3900 else:
3902 lang = self.apiLanguage 3901 lang = self.apiLanguage
3903 if forPygments: # __IGNORE_WARNING_Y102__ 3902 if forPygments and lang == "Python3":
3904 # adjust some names to Pygments lexer names 3903 # adjust some names to Pygments lexer names
3905 if lang == "Python3": 3904 lang = "Python"
3906 lang = "Python"
3907 return lang 3905 return lang
3908 3906
3909 def __checkLanguage(self): 3907 def __checkLanguage(self):
3910 """ 3908 """
3911 Private method to check the selected language of the language submenu. 3909 Private method to check the selected language of the language submenu.

eric ide

mercurial