src/eric7/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckService.py

branch
eric7
changeset 9624
b47dfa7a137d
parent 9413
80c06d472826
child 9653
e67609152c5e
equal deleted inserted replaced
9623:9c1f429cb56b 9624:b47dfa7a137d
10 """ 10 """
11 11
12 from PyQt6.QtCore import QObject, pyqtSignal 12 from PyQt6.QtCore import QObject, pyqtSignal
13 13
14 from eric7.EricWidgets.EricApplication import ericApp 14 from eric7.EricWidgets.EricApplication import ericApp
15 from eric7.Utilities import determinePythonVersion 15 from eric7.SystemUtilities import PythonUtilities
16 16
17 17
18 class SyntaxCheckService(QObject): 18 class SyntaxCheckService(QObject):
19 """ 19 """
20 Implement the syntax check service. 20 Implement the syntax check service.
50 50
51 @param filename of the sourcefile (str) 51 @param filename of the sourcefile (str)
52 @param source code of the file (str) 52 @param source code of the file (str)
53 @return language of the file or None if not found (str or None) 53 @return language of the file or None if not found (str or None)
54 """ 54 """
55 pyVer = determinePythonVersion(filename, source) 55 pyVer = PythonUtilities.determinePythonVersion(filename, source)
56 if pyVer: 56 if pyVer:
57 return "Python{0}".format(pyVer) 57 return "Python{0}".format(pyVer)
58 58
59 for lang, (_env, _getArgs, getExt) in self.__supportedLanguages.items(): 59 for lang, (_env, _getArgs, getExt) in self.__supportedLanguages.items():
60 if filename.endswith(tuple(getExt())): 60 if filename.endswith(tuple(getExt())):

eric ide

mercurial