mirror of
https://github.com/aljazceru/gpt-engineer.git
synced 2025-12-17 12:45:26 +01:00
'Refactored by Sourcery' (#188)
This commit is contained in:
@@ -14,11 +14,10 @@ class DB:
|
||||
def __getitem__(self, key):
|
||||
full_path = self.path / key
|
||||
|
||||
if full_path.is_file():
|
||||
with full_path.open("r", encoding="utf-8") as f:
|
||||
return f.read()
|
||||
else:
|
||||
if not full_path.is_file():
|
||||
raise KeyError(key)
|
||||
with full_path.open("r", encoding="utf-8") as f:
|
||||
return f.read()
|
||||
|
||||
def __setitem__(self, key, val):
|
||||
full_path = self.path / key
|
||||
|
||||
Reference in New Issue
Block a user