mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-13 12:09:35 +03:00
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.
This commit is contained in:
parent
7598a2965c
commit
4708b592e2
2
setup.py
2
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
|
||||
|
Loading…
Reference in New Issue
Block a user