From 4708b592e208785143dfa77f417662ba066326cf Mon Sep 17 00:00:00 2001 From: Luflosi Date: Wed, 26 Jun 2019 14:54:50 +0200 Subject: [PATCH] Unify compilation_database access `file` and `arguments` are accessed using the square bracket syntax, while `output` is accessed using `.get()`. This commit uses square brackets for all three. This will throw a `KeyError` if `compilation_database` does not have the key, which is the correct behaviour IMO. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e862ab789..f64c3c2f1 100755 --- a/setup.py +++ b/setup.py @@ -428,7 +428,7 @@ class CompilationDatabase: except FileNotFoundError: compilation_database = [] compilation_database = { - CompileKey(k['file'], k.get('output')): k['arguments'] for k in compilation_database + CompileKey(k['file'], k['output']): k['arguments'] for k in compilation_database } self.db = compilation_database return self