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

branch
eric7
changeset 9482
a2bc06a54d9d
parent 9473
3f23dbf37dbe
child 9507
1f39839655ea
equal deleted inserted replaced
9481:0b936ff1bbb9 9482:a2bc06a54d9d
173 (file name, line number, column, codestring (only at syntax 173 (file name, line number, column, codestring (only at syntax
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 # __IGNORE_WARNING_I10__
179 179
180 from tomlkit.exceptions import KeyAlreadyPresent, ParseError 180 from tomlkit.exceptions import ( # __IGNORE_WARNING_I10__
181 KeyAlreadyPresent,
182 ParseError,
183 )
181 except ImportError: 184 except ImportError:
182 error = "tomlkit not available. Install it via the PyPI interface." 185 error = "tomlkit not available. Install it via the PyPI interface."
183 return [{"error": (file, 0, 0, "", error)}] 186 return [{"error": (file, 0, 0, "", error)}]
184 187
185 codestring = normalizeCode(codestring) 188 codestring = normalizeCode(codestring)

eric ide

mercurial