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

branch
eric7
changeset 9473
3f23dbf37dbe
parent 9467
1798115ba35c
child 9482
a2bc06a54d9d
equal deleted inserted replaced
9472:5798ee4a8807 9473:3f23dbf37dbe
5 5
6 """ 6 """
7 Module implementing the syntax check for TOML. 7 Module implementing the syntax check for TOML.
8 """ 8 """
9 9
10 import multiprocessing
10 import queue 11 import queue
11 import multiprocessing
12 12
13 13
14 def initService(): 14 def initService():
15 """ 15 """
16 Initialize the service and return the entry point. 16 Initialize the service and return the entry point.
174 errors), the message, a list with arguments for the message) 174 errors), the message, a list with arguments for the message)
175 @rtype dict 175 @rtype dict
176 """ 176 """
177 try: 177 try:
178 import tomlkit 178 import tomlkit
179 from tomlkit.exceptions import ParseError, KeyAlreadyPresent 179
180 from tomlkit.exceptions import KeyAlreadyPresent, ParseError
180 except ImportError: 181 except ImportError:
181 error = "tomlkit not available. Install it via the PyPI interface." 182 error = "tomlkit not available. Install it via the PyPI interface."
182 return [{"error": (file, 0, 0, "", error)}] 183 return [{"error": (file, 0, 0, "", error)}]
183 184
184 codestring = normalizeCode(codestring) 185 codestring = normalizeCode(codestring)

eric ide

mercurial