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) |