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 7fba427 commit cef6ec5Copy full SHA for cef6ec5
codebasin/__init__.py
@@ -112,10 +112,10 @@ def from_json(cls, instance: dict):
112
CompileCommand
113
A CompileCommand corresponding to the JSON object.
114
"""
115
- directory = instance["directory"] if "directory" in instance else None
116
- arguments = instance["arguments"] if "arguments" in instance else None
117
- command = instance["command"] if "command" in instance else None
118
- output = instance["output"] if "output" in instance else None
+ directory = instance.get("directory", None)
+ arguments = instance.get("arguments", None)
+ command = instance.get("command", None)
+ output = instance.get("output", None)
119
return cls(
120
instance["file"],
121
directory=directory,
0 commit comments