We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75e6875 commit 934851bCopy full SHA for 934851b
pylsp_mypy/plugin.py
@@ -22,6 +22,7 @@
22
import collections
23
import warnings
24
import shutil
25
+import ast
26
27
line_pattern: str = r"((?:^[a-z]:)?[^:]+):(?:(\d+):)?(?:(\d+):)? (\w+): (.*)"
28
@@ -307,7 +308,7 @@ def init(workspace: str) -> Dict[str, str]:
307
308
path = findConfigFile(workspace, ["pylsp-mypy.cfg", "mypy-ls.cfg", "mypy_ls.cfg"])
309
if path:
310
with open(path) as file:
- configuration = eval(file.read())
311
+ configuration = ast.literal_eval(file.read())
312
313
mypyConfigFile = findConfigFile(workspace, ["mypy.ini", ".mypy.ini"])
314
mypyConfigFileMap[workspace] = mypyConfigFile
0 commit comments